How can I configure my UNIX or/and Linux PC with COM port to support serial console connections? I would like to connect my notebook to that PC via a console cable and manage the PC with terminal emulation software like putty, as if I use keyboard directly.
I have this line in
/etc/inittab
on a server I run that has a serial console:ttyS0
is the serial port. That's all there is to it, at least here.Edit: You'll probably want something like this in your grub.conf:
And then with each kernel:
(The important part is the
console=
arguments)In addition to the other answers, I'd suggest looking here:
http://tldp.org/HOWTO/Remote-Serial-Console-HOWTO/
Specifically, the GRUB section so that you can get the boot menu too (not just the OS once it begins to load):
http://tldp.org/HOWTO/Remote-Serial-Console-HOWTO/configure-kernel-grub.html
See the other answers if your distro uses
inittab
. But Ubuntu uses/etc/event.d
and most other distros are or will as they adopt the more modern init daemon Upstart. At least it will eventually get rid of those hideous System V "run levels".If you do have a
/etc/event.d/
, in there you should havetty1
,tty2
, .... You may need to copy one of thetty
files tottyS0
. (Check/proc/devices
to see what you have.)These files look something like:
Be sure the device name and the speed are what you want.
You just tell the machine you want to connect to with the serial console to listen on a serial port. Most Linux distributions come with examples in their
/etc/inittab
files that show how to do it (look for/dev/ttyS0
).