Editor: The article I’m linking to offers up some command line tricks that will make working at the command line a little bit more efficient. Enjoy!

If there is one tool that every developer uses regardless of language, platform, or framework it’s the terminal. If we are not compiling code, executing git commands, or scp-ing ssl certificates to some remote server, we are finding a new version of cowsay to entertain ourselves while we wait on one of the former. As much as we use the terminal it is important that we are efficient with it. Here are some ways I make my time in the terminal efficient and effective.

Assumed Settings

Some of these commands list alt as a prefix character. This is because I have manually set alt as a meta key. Without this setting enabled you have to use the esc key instead. I recommend enabling the alt key. In Mac Terminal.app this setting is Preferences > Profiles tab > Keyboard sub-tab > at the bottom “Use option as meta key.” In iTerm2 the setting is at Preferences > Profiles tab > Keys sub-tab > at the bottom of the window set “left/right option key acts as” to “+Esc”. In GNOME terminal Edit > Keyboard Shortcuts > uncheck “Enable menu access keys.”

I assume you’re using bash. I know there are some cool newcomers out there like zsh and fish, but after trying others out I always found that some of my utilities were missing or ill-replaced. If you are not using bash then YMMV.

I also assume you are using at least bash version 4. If you’re on a Mac then, unless you have manually installed bash with homebrew, you are using an old version. Install bash with homebrew and include it in /etc/shells.

Repeat Commands

Read the complete article here.

Linux Bash shell terminal emulator