Ctrl-C, Ctrl-L, and the &

I’m getting some feedback from students regarding problems getting “stuck” on the command line, especially after entering commands that run programs (e.g., SciTE and ruby, as opposed to commands like ls and cd).

Here are a few potentially helpful hints:

  • When you find yourself stuck at the command line — i.e., it doesn’t respond to anything you enter — you can try holding down the ‘Ctrl’ key and hitting ‘C’. We refer to this ‘Ctrl-C’ (read: ‘Control C’) combination as a “software interrupt”. You can do it a few times in succession, and it’ll frequently interrupt whatever else the command line is trying to do, and get it to pay attention to you.
  • Sometimes it’s possible that you’re not stuck, and that you just can’t see what’s going on. ‘Ctrl-L’ is a combination you can use to redraw the screen.
  • Remember, too, that you can force the command line to run a command in the background by putting an ampersand character (&) after the command. So, for instance, you can use the command SciTE filename.rb & to start up the editor with the file “filename.rb” and at the same time continue using the command line.

Leave a comment

You must be logged in to post a comment.