Home arrow Journal arrow Sending Ctrl C to a Serial Console to Stop a Program
Sending Ctrl C to a Serial Console to Stop a Program PDF
Thursday, 17 October 2013
Let's say we've connected to a virtual serial console (created from VirtualBox) as a socket, using:

  nc -U serialconsole

and we've issued a ping command:

  ping www.example.com

If we press Ctrl+C we will exit from nc connection to that socket (serialconsole).

To send a Ctrl+C to that serial console and stop ping command we will first press Ctrl+C to exit nc, then we will run (will work in bash shell):

  echo $'\cc' | nc -U serialconsole

which send Ctrl+C to our socket.

Then we will reconnect using the following command:

 nc -U serialconsole

And voila the ping command won't run anymore.

 
< Prev   Next >

Other BSD Systems

OpenBSD

Misc

Solaris

Polls

Best BSD firewall?