


Glob-expand-word can be found on “\C-x*”. Glob-complete-word can be found on “\eg”. If you have any other handy keyboard shortcuts or tricks for the command line, share them with us!Ībort can be found on “\C-g”, “\C-x\C-g”, “\e\C-g”.Īccept-line can be found on “\C-j”, “\C-m”.īackward-char can be found on “\C-b”, “\eOD”, “\e[D”.īackward-delete-char can be found on “\C-h”, “\C-?”.īackward-kill-line can be found on “\C-x\C-?”.īackward-kill-word can be found on “\e\C-h”, “\e\C-?”.īackward-word can be found on “\e[1 5D”, “\e[5D”, “\eb”.īeginning-of-history can be found on “\e”, “\e[6~”.Įnd-of-line can be found on “\C-e”, “\eOF”, “\e[4~”, “\e[8~”, “\e[F”.Įxchange-point-and-mark can be found on “\C-x\C-x”.įorward-char can be found on “\C-f”, “\eOC”, “\e[C”.įorward-search-history can be found on “\C-s”.įorward-word can be found on “\e[1 5C”, “\e[5C”, “\ef”. Swap the last two words before the cursor Swap the last two characters before the cursor Puts whatever you are running into a suspended background process. Let’s you search through previously used commands If you are at the end of the line, clears the entire line. Go to the end of the line you are currently typing onĬlears the Screen, similar to the clear commandĬlears the line before the cursor position. Go to the beginning of the line you are currently typing on Technically, these should work in Linux and other Bash shells too, but obviously we’re focusing on the Mac here. These will work in the Mac Terminal for any version of Mac OS X, that includes the default Terminal app and third party terminal applications like iTerm as well. Take a moment to do that, learn a bit more about the command line, and have fun.ġ2 Command Line Keyboard Shortcuts for Mac OS X While the keystrokes will perform some incredibly useful tasks, the complexity isn’t too deep or crazy so you should be able to try all these out within a minute or two. So if you’re ready to get your feet wet, open up the Terminal and try these shortcuts out, they’re sure to make your command line life easier.
