AI Hints
Home›Linux Tutorial›Help and Practice
Linux · Lesson 10 of 120

Shortcuts and Getting Unstuck

Ctrl C and friends.

⏱ 2 min read▶ Video at 10:04🎓 Free
Watch this lesson in the Linux courseWatch on YouTube ↗Full Linux course

Sooner or later, a command will seem stuck. Maybe it's waiting for something, or it just keeps going. Don't panic, and don't close the window. There are simple keys that get you out of trouble.

Shortcuts and Getting Unstuck
From the video: Shortcuts and Getting Unstuck
  • A command seems stuck
  • Don't close the window
  • A few keys fix it

Keys to remember

Control C stops the command that's running right now. It's the one to remember most. Control L clears the screen, so you get a fresh, empty window. Control D means, I'm finished typing, and in an empty prompt it closes the terminal. And Q quits many programs that show pages of text.

Ctrl + Cstop the running command
Ctrl + Lclear the screen
Ctrl + Dend of input, or exit
qquit a page viewer

clear and exit

There are commands for some of these too. Clear wipes the screen, just like control L. And exit closes the shell, and the terminal window with it. On a remote server, exit logs you out.

Terminal
echo some old text
some old text
clear

Typing mistakes

Linux is case sensitive. Date with a capital D is a different word from date with a small d, and the shell won't find it. If you see command not found, check your spelling, and check for capital letters. Most commands are all lowercase.

keyvalue
dateworks
Datecommand not found
Rulecommands are lowercase
Checkspelling and capitals

Summary

Control C stops a command, control L or clear cleans the screen, and exit closes the shell. And watch out for capital letters. Next, how to get help for any command.

Key takeaways
  • Ctrl+C stops
  • clear cleans
  • exit closes
Next up: Getting Help — --help and man pages