Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to login to a server through the serial port using agetty. When I start agetty and open the serial connection, I see the login prompt but as soon as I enter the username (in my case root), agetty gets killed. Not only that, along with agetty, it's parent shell is also being terminated. The following command sequence illustrates this. After starting agetty(the second line), I try to login through the serial port but end up losing the connection as below.

(0)#agetty 115200 /dev/ttyS0
Connection to dir1 closed.

Any suggestions on why this might be happening? I'm using SLES version 10 and the serial port is connected to a terminal server that is being accessed through a web browser. I'm not sure if rebooting the server with an entry in inittab would make a difference but I'm not inclined towards that as this is a production server and down-times are expensive.


share|improve this question
Thanks for your reply @MichaelHampton. That worked for me! Although I'm still curious why it would not work when I directly invoke agetty through command line. Can you please throw some light on that? Thanks! – AnlKumr Jun 4 '13 at 2:05
up vote 1 down vote accepted

You should have this in inittab, and you don't have to reboot. Just telinit q.

As for agetty in a shell, it really was not designed to run in the foreground and control some other terminal; while you could pass it a tty argument of -, this would cause it to print a login prompt in your terminal, rather than on the serial port, which isn't what you want.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.