Command line tools to make your life easier
If you’re like me, you spend most of your time in the command line, where saving even a few keystrokes can help you become significantly more productive (and happier :). Here are some tools that I’ve found to be incredibly helpful and have augmented my love for the command line through their sheer awesomeness
Bat is a successor to the unix
cat command that boasts many superpowers, like preview with a pager, syntax highlighting, and even git changes. It supports most of the programming languages out of the box. You could just alias
cat to point to
Here’s a screenshot of it in action with my
Typing full directory paths on the command line is a chore. Which is why I keep track of my recently visited directories with a handy program called
z.lua, which is a lua re-write of the namesake z.sh written in bash.
z.lua tracks a parameter called frecency which is a combination of frequency and recent visits to directories. Once you’ve visited a directory, it’s added to the list of visited directories sorted by the frecency and you can visit it just by providing a simple fuzzy argument to the z command, however nested the target directory. Check out the project homepage for more details.
A number of times you need to share a local text file on your system with the world, be it some config file or code file etc. ix uploads whatever text you pipe into it and returns a URL of the uploaded text. For ex. to share your bashrc with the world, just issue
cat ~/.bashrc | ix
This will output a URL to STDOUT that you can visit to access the uploaded content. You can also create an account to keep track of your uploads and manage them.
If you use Network Manager for network configuration, you’re gonna love the bundled
nmtui program. It lets you manage your wireless(or wired) connections with a breeze with a sweet terminal UI.
No list of command line tools would be complete without a cli file manager, which is one of the most used apps on any operating system. Enter nnn , a fast and simple file manager written in C++. It has a lot of features- viz. vim like keybindings, search as you type, opening files with the default/custom app, disk usage reporting etc.
Alternatives to nnn are fff, ranger and midnight commander
You should back up your system regularly to protect your data from unexpected hardware failures. Enter
borg, a command line backup tool written in Python. It is fully featured, has a lot of encryption options and is quite stable and popular based on de-duplication. It’s pretty straight forward to use too.
Even the best of us can forget details of how some of our favorite cli tool options work. Um helps you to create and manage your own manpages so you could track the commonly used commands with options until you memorize them. Creating and updating manpages is as easy as
um edit and recalling them is as easy as
um <target>. For ex. I can never remember the different options I use for my borg backups, so I’ve created an um page for the purpose-
It’s usually quite daunting and hectic to go through a command’s man page for a simple option you want to find. Tldr pages provide a quick summary of any command(s) you’re not familiar with. It lists the most common options for tools with examples of how they work, significantly easing your way around it. Here’s an example description of curl using
tldr has community pages for almost any command you could come across.
Bro is an alternative written in ruby.
Bash is a really powerful tool to further expand your mastery of the command line and Linux in general. shellcheck is a handy tool that helps to lint/analyze your bash scripts.
Like the name says, this nifty utility draws a circular process tree which you can set as your desktop wallpaper. It has a lot of options and is quite straightforward to use. Here’s an example of its usage-
This list just covers the tools I use on a day to day basis. If you’re itching for more, check out this awesome list or this subreddit dedicated solely to command line applications.