How To Configure Linux Console Terminal Serial Ports UNIX Hyper-Terminal

Mobile
feeds
Welcome Login | Register

How To Configure Linux Console Terminal Serial Ports UNIX Hyper-Terminal
Reply Your Comments:
Click this button if you are interested in replying to this topic and leave your comments
Sent To Friend
CLick this button if you want to send this page to a friend.
Subsribe To Rss Feeds
Subscribe to RSS
CLick this button if you want to subscribe to this RSS Feed. You can use your browsers feeds burners if you have mozilla or internet explorer 7 or higher and keep up with updates.
  Forums Index
      » Linux Forums
        » » How To Configure Linux Console Terminal Serial Ports UNIX Hyper-Terminal
How To Configure Linux Console Terminal Serial Ports UNIX Hyper-Terminal
Post Description: how to configure linux console terminal serial ports unix hyper terminal Linux
Post Tags:
This Post Has Been Viewed 13012 Times Since Tue Nov 21, 2006 10:29 am Author unix with 10 replies
How To Configure Linux Console Terminal Serial Ports UNIX Hyper-Terminal
Advertise On This Page




post pictureAs you may or may not know, UNIX is a command line operating system. Most administrators (like me) have to use the shell on Linux/UNIX systems because they don't have a nice and pretty GUI (Graphical User Interface) A gui is something like windown. A command line doesn't have all the images, instead it only has a prompt, letters and numbers..

How to Configure Linux Console:
Follow these steps to configure the linux machine,box, server,computer or whatever you call it.

Step 1. MAKE BACKUP - You will need to make a backup copy of your inittab, so to do this, send this command.
     Code:
cp /etc/inittab /etc/inittab.org


Step 2. CHECK SERIAL PORTS ARE ENABLED: Send this comands to check you have console ports in your motherboard:


     Code:
dmesg | grep tty

You will see something like this:

     Code:
ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A


Now send this command:

     Code:
setserial -g /dev/ttyS[01]


You should see somthing like this:

     Code:
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3


NOTE: Sometimes you will need to enable the serial port in your mother baord by going into the BIOS.

Step 3. EDIT INITTAB FILE - To edit the inittab file, execute this command:
     Code:
nano /etc/inittab
NOTE: For my example i used the nano text editor, you can use whatever text editor you prefer, like VI Editor.

The inittab file should look something like this:

     Code:
#
# inittab This file describes how the INIT process should set up
# the system in a certain run-level.
#
# Author: Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
# Modified for RHS Linux by Marc Ewing and Donnie Barnes
#

# Default runlevel. The runlevels used by RHS are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:3:initdefault:

# System initialization.
si::sysinit:/etc/rc.d/rc.sysinit

l0:0:wait:/etc/rc.d/rc 0
l1:1:wait:/etc/rc.d/rc 1
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6

# Trap CTRL-ALT-DELETE
ca::ctrlaltdel:/sbin/shutdown -t3 -r now

# When our UPS tells us power has failed, assume we have a few minutes
# of power left. Schedule a shutdown for 2 minutes from now.
# This does, of course, assume you have powerd installed and your
# UPS connected and working correctly.
pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down"

# If power was restored before the shutdown kicked in, cancel it.
pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled"


# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6

# Run xdm in runlevel 5
x:5:once:/etc/X11/prefdm -nodaemon


Search for the line where it says: 6:2345:respawn:/sbin/mingetty tty6 and add these line:


     Code:
# Run agetty on COM1/ttyS0 and COM2/ttyS1
s0:2345:respawn:/sbin/agetty -L -f /etc/issueserial 9600 ttyS0 vt100
s1:2345:respawn:/sbin/agetty -L -f /etc/issueserial 38400 ttyS1 vt100
#s1:2345:respawn:/sbin/agetty -L -i 38400 ttyS1 vt100


so now your inittab file should look like this:


     Code:
#
# inittab This file describes how the INIT process should set up
# the system in a certain run-level.
#
# Author: Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
# Modified for RHS Linux by Marc Ewing and Donnie Barnes
#

# Default runlevel. The runlevels used by RHS are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:3:initdefault:

# System initialization.
si::sysinit:/etc/rc.d/rc.sysinit

l0:0:wait:/etc/rc.d/rc 0
l1:1:wait:/etc/rc.d/rc 1
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6

# Trap CTRL-ALT-DELETE
ca::ctrlaltdel:/sbin/shutdown -t3 -r now

# When our UPS tells us power has failed, assume we have a few minutes
# of power left. Schedule a shutdown for 2 minutes from now.
# This does, of course, assume you have powerd installed and your
# UPS connected and working correctly.
pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down"

# If power was restored before the shutdown kicked in, cancel it.
pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled"


# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6

# Run agetty on COM1/ttyS0 and COM2/ttyS1
s0:2345:respawn:/sbin/agetty -L -f /etc/issueserial 9600 ttyS0 vt100
s1:2345:respawn:/sbin/agetty -L -f /etc/issueserial 38400 ttyS1 vt100
#s1:2345:respawn:/sbin/agetty -L -i 38400 ttyS1 vt100


# Run xdm in runlevel 5
x:5:once:/etc/X11/prefdm -nodaemon


Step 4. ACTIVATE NEW CHANGES - to active the new changes, send this command:
     Code:
init q


Step 5. CONFIRM agetty IS LISTENING TO PORTS: send this command to confirm:
     Code:
ps -ef | grep agetty


The output should look like this:

     Code:
[root@ns3 ~]# ps -ef | grep agetty
root 3526 1 0 09:27 ttyS1 00:00:00 /sbin/agetty -L -f /etc/issueserial 38400 ttyS1 vt100
root 5337 3762 0 10:23 pts/0 00:00:00 grep agetty


Step 6. HOW TO CONNECT FROM PC TO SERVER CONSOLE: Now comes the good part, connecting to your console ports. Now that they have been enabled, you can connect to them. These are the parts (items) things you are going to need to connect:

1 roll-over cable
2 db-9 connectors
post picture

Step 7 - EMULATOR - for this tutorial guide, i will be using windows Hyper-Terminal. These are the step to take to start they hyper-terminal:

Give your connection a name, you can name it whatever you want:
post picture

Select the COM connection, in my exaple i am using COM1
post picture

Make sure to use these setting: 9600 8-N-1
post picture

Now you should be connected to the Shell
post picture

DONE

credit To Van Emery : http://www.vanemery.com/Linux/Serial/serial-console.html



Leave Your Comments

Share:   Subscribe - Keep Up With This Topic
You can use this HTML code to put it on your website to show your friends this wallpaper. Use this code on your profile like myspace, friendster, Facebook or others. Just Copy and Paste it in your HTML on your websites
URL:
To embed this topic, just copy the code from the "Embed" box. Once you've copied the code, just paste it into your website or blog to embed it.
Embed:
BBCODE is use on forums. You can put this code on all your BBCODE enabled forums like PhpBB, vBulletin® and others. Just Copy and Paste this code on your Posts and Replies on your forums
Fourms BBCODE:
Links Related to : How To Configure Linux Console Terminal Serial Ports UNIX Hyper-Terminal
Add Link:
No Links Have Been Added To This Topic

Comments and replies About How To Configure Linux Console Terminal Serial Ports UNIX Hyper-Terminal
:: 1 :: Reply #618 Reply By Feeyo On Tue Feb 27, 2007 11:16 am
Feeyo:
Really good howto! =)
Although i was searching for how to connect to a terminal with my linux laptop. Anyone knows?

:: 2 :: Reply #4879 Reply By Iqbal On Wed May 30, 2007 6:52 pm
Iqbal:
yeah, we are looking for linux/unix hyperterminal that support ctrl-z command. not this windows capitalist program...
:: 3 :: Reply #23649 Reply By GABRIEL On Wed Oct 10, 2007 6:04 am
GABRIEL:
dear sir,
i find your work very useful, but i would like you to recommend a terminal emulator
that can be run on a linux based system,just like windows hyper terminal. i will find it very rewarding to me if you can help me out in tthis area.
thanks
gabriel
:: 4 :: Reply #34942 Reply By Mahmoud Allathkani On Sat Jan 05, 2008 11:03 pm
Mahmoud Allathkani:
good stuff
however why all this headech while you can get an external tool can connect to linux server using ssh or telnet.
unless you have no network connectivity and available console to the linux server then i would say, yes this is good way to get to the server console command line to manage it as this is will become the last resort.
:: 5 :: Reply #50507 Reply By sanwin On Thu Apr 17, 2008 7:36 am
sanwin:
testaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
:: 6 :: Reply #62804 Reply By buddy On Mon Jul 21, 2008 10:48 pm
buddy:
good information..................thanks
:: 7 :: Reply #70089 Reply By Dale On Wed Sep 10, 2008 11:52 am
Dale:
started out to be a good tutorial, but is left hanging in space by finishing in windows. i think you need to learn how to do things before you try to teach someone else.
:: 8 :: Reply #72844 Reply By hiper terminals On Sun Sep 28, 2008 4:02 pm
hiper terminals:
thank you, i always want to learn how to connect to linux console using hyperterminal
:: 9 :: Reply #93544 Reply By confsed On Tue Feb 10, 2009 10:16 pm
confsed:
i also have this cnosole cable for my linux consoel server that i connect the donsole link with another vonsole server and now i have both xonsole in the same direction but one of the cinsole cant see the other clnsole so can you help me troublehshoot his cpnsole cnnection i made for the first one and do you have to have windows xp for be able to adapt the comsole to a linux cohsole cobsole coneole conamericane condole conwole consile conslle consple consope consome consoke termnial treminal rerminal germinal yerminal teeminal tetminal tegminal tefminal terninal terkinal terjinal termonal termunal termknal termimal termihal termibal terminsl terminzl terminql terminap terminam terminak sreial eerial aerial derial werial seeial setial segial sefial seroal serual serkal serisl serizl seriql seriap seriam seriak consol teminal linxu lniux hiper terminol configu configurar configura properties defaults term server connections howto ports port scsi ansi connection
:: 10 :: Reply #93545 Reply By lunar95s On Tue Feb 10, 2009 10:18 pm
lunar95s:
where can i buy that type of cable i went to best buy and circuit city and they told me they dont cary thos types of cables. what are they called?