Awesome Command-Line tools to boost your productivity

Tags: linux, bash, productivity
Published: 2020-08-07 13:47:18


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 - 


## 1. [z.sh](https://github.com/rupa/z)

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 ~/src/zsh.

**Use case**: 
* Quickly going to the right directory in your local machine.

![z-sh](https://dev-to-uploads.s3.amazonaws.com/i/jqyctomb5n12sufgcvpu.gif)

## 2. [tmux](https://github.com/tmux/tmux)

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.

**Use Cases**: 
* 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

![tmux](https://dev-to-uploads.s3.amazonaws.com/i/9ciyx17cks164hz1givw.gif)


## 3. [how2](https://github.com/santinic/how2)
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.

**Use Cases:**
* Quickly find a code snippet to execute a shell task
* Find code snippets for common problem in programming language of choice.

![how2](https://dev-to-uploads.s3.amazonaws.com/i/zv3fyiinwj1vqzyhycwi.gif)



## 4. [fzf](https://github.com/junegunn/fzf)
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](https://www.youtube.com/watch?v=qgG5Jhi_Els) does a great job in explaining all the cool things you can do with fzf. 


**Use Cases:**
* Search for files in your system or in a directory
* Search through results of another command like ```ls``` or ```grep``` 

![fzf](https://dev-to-uploads.s3.amazonaws.com/i/mk65bd1hq7wv6vd0r2h8.gif)
## 5. [tldr](https://github.com/tldr-pages/tldr)
tldr is an attempt to simplify verbose & lengthy [man pages](https://en.wikipedia.org/wiki/Man_page) 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!

![tldr](https://dev-to-uploads.s3.amazonaws.com/i/0zl92jx6k1rb80lxy5ns.gif)

### Conclusion

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!

If you liked this article, do check out [my blog](https://tasinishmam.com/posts/).

### Acknowledgements
* This article was inspired by the post: [Ask HN: Programs that saved you 100 hours?](https://news.ycombinator.com/item?id=22849208) on Hacker News. 
* The credits for the gifs belong to their respective creators.