DEV Community

loading...
Cover image for Awesome Command-Line tools to boost your productivity

Awesome Command-Line tools to boost your productivity

Tasin Ishmam
Software Engineer with a passion for back-end Web Development and Machine Learning. Writes about technology at https://tasinishmam.com/
・3 min read

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

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

2. 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

3. 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

4. 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 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

5. tldr

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!

tldr

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.

Acknowledgements

Discussion (17)

Collapse
ajboni profile image
ajboni

great list! check out cheat.sh also seems similar to how2

Collapse
tasinishmam profile image
Tasin Ishmam Author

Thank for the suggestion!

From my first impression, this seems very much like tldr.

Collapse
conectionist profile image
conectionist

Awesome post!

Collapse
tasinishmam profile image
Tasin Ishmam Author

Thank you, hope you found something you liked!

Collapse
conectionist profile image
conectionist

Definitely!
How2 is something I'm definitely going to try.
Thanks for sharing!

Collapse
cirrus profile image
OnFileNotWanted • Edited

lol you missed one
github.com/knqyf263/pet

custom snipppet.toml
paste.xinu.at/yZu6H/

Collapse
tasinishmam profile image
Tasin Ishmam Author

This is pretty cool. I think oh-my-zsh's autocomplete features covers a part of this use-case for me so never really thought of using a snippet manager.

Thanks for the info!

Collapse
cirrus profile image
OnFileNotWanted • Edited

yeah i like teh fact it puts chosen snippet right on $PS1 to be executed.
teh shell function is handy

Collapse
jadia profile image
Nitish Jadia

Great collection of tools.

Collapse
the_riz profile image
Rich Winter • Edited

Let me also recommend you check out ack ! It's grep on steroids:
beyondgrep.com/

Collapse
jakeerc profile image
Jakeer

Salamalaikum, jazakallah khair

Collapse
tasinishmam profile image
Tasin Ishmam Author

Wa alaykum as-salam :)

Collapse
andrewbaisden profile image
Andrew Baisden

Good post thanks for sharing it.

Collapse
tasinishmam profile image
Tasin Ishmam Author

You're welcome, glad you liked it!

Collapse
r0v profile image
Tpk • Edited

I can also recommend zsh-autosuggestions for everyone who has zsh as default shell.

Collapse
noaahhh profile image
nuh yurduseven

Wow, "how2 " is very useful. I didn't know before. Thanks....

Collapse
tasinishmam profile image
Tasin Ishmam Author

Welcome, glad you found something useful!