If you’re on a Unix system you probably have to constantly interact with the terminal, one way or another. So, the more you can speed up your terminal workflow, the more efficiently you can get work done. I want to share my personal favorite command line tools that will boost your productivity and help you save time. Let’s begin -
Z is a command line tool that allows you to jump quickly to directories that you have visited frequently in the past, or recently – but most often a combination of the two (a concept known as “frecency”). It works by keeping track of when you go to directories and how much time you spend in them. It is then in the position to guess where you want to go when you type a partial string, e.g.
z src might take you to
- Quickly going to the right directory in your local machine.
Tmux is a terminal multiplexer: Essentially this means that tmux lets you tile window panes in a command-line environment. This way, you can run and track multiple programs from the same terminal, saving you the hassle of constantly having to shift terminal windows. Tmux also lets you “detach” your terminal sessions and get back to them later without the session being interrupted, a lifesaver for long running server tasks.
- Easily traverse multiple command line windows
- Keep a terminal session or task alive for a long time without keeping your computer open.
- Easily manage tasks on a remote server
how2 is a command line utility to quickly search up programming tasks in natural language. It’s like Stackoverflow, but for the command line. Using Stackoverflow and Google API, how2 immediately gives you the most likely answer. You can also go into the interactive mode and search through all the results. How2 saves me a lot of time because I don’t have to switch to the browser to search for simple things.
- Quickly find a code snippet to execute a shell task
- Find code snippets for common problem in programming language of choice.
fzf is a fuzzy text finder for pretty much anything in your system. fzf can help you find files in your computer, previous commands in your shell history, results from a search or anything else. fzf is incredibly flexible because it supports searching through the results of any other unix command. All you need to do is pipe the results to fzf. Eg -
ls | fzf. This video does a great job in explaining all the cool things you can do with fzf.
- Search for files in your system or in a directory
- Search through results of another command like
tldr is an attempt to simplify verbose & lengthy man pages for common unix commands and tools. tldr pages are simple, approachable and prioritizes the common use cases. This makes tldr ideal to quickly get an idea about any new command.
Let’s look at an example. Want to know how to do a
grep in case insensitive mode? tldr it!
These are the five tools that I felt have saved me a ton of time in doing my work as a developer. They’re also general purpose enough to be utilized and enjoyed by a wide range of professionals and hobbyists. What unix programs has been the most helpful in your experience? Feel free to share your favorites with me!
- This article was inspired by the post: Ask HN: Programs that saved you 100 hours? on Hacker News.
- The credits for the gifs belong to their respective creators.