I love working with the command line. Not only does it help me complete tasks quickly and efficiently, but it also provides access to several tools that have genuinely transformed my experience. These tools have made me more productive, more efficient, and, dare I say, even more excited to work in the terminal. Let’s dive into some of my favorite command-line tools.
Table of Contents
1. Tldr
You know those man pages? They’re incredibly detailed, which is great, but sometimes, you just need a quick reminder of a command’s basic usage without knowing its background. That’s where tldr comes in. It lets you quickly find the right command without wading through lengthy man pages.
For example, if you’re trying to remember the syntax for tar
, instead of typing man tar
, you can simply enter tldr tar
to see a few common use cases.
2. Btop
Next up is btop, an advanced and user-friendly alternative to top or htop. It displays CPU usage, memory consumption, disk I/O, and network activity in a visually appealing way. This makes it much easier to quickly grasp your system’s performance at a glance.
Additionally, it’s highly configurable, enabling you to customize the display to showcase the information that matters most to you. I find it especially helpful when troubleshooting performance issues. Instead of sifting through a wall of text, I can instantly identify if a particular process is consuming excessive resources.
To install btop, you can use your system’s package manager. For example, on Ubuntu/Debian-based systems, run:
sudo apt install btop
Once installed, simply type btop
in your terminal, and you’ll be greeted with a dynamic dashboard showing your system’s performance.
3. Midnight Commander
Midnight Commander is a file manager for the command line, featuring two panels that make managing files and directories straightforward. With MC, you can copy, move, delete, or edit files – all without leaving the terminal.
It also includes a built-in file viewer for various formats, including text, binary, and archive files, enabling you to view files directly without opening additional programs. MC supports remote systems via FTP or SSH and treats archive files as local directories, making it a highly versatile tool for file management.
To install Midnight Commander on Ubuntu, run:
sudo apt install mc
You can launch it by executing mc
in the terminal.
Navigate using the arrow keys and utilize the function keys for particular operations. By learning the function key shortcuts, you can navigate your file system more efficiently than ever before.
4. Zoxide
Have you ever found yourself repeatedly typing long paths just to access a project folder? zoxide keeps track of the directories you visit and enables you to move to them with just a few keystrokes instead of typing full paths. This saves significant time, particularly when working with numerous files and directories regularly.
For example, if you frequently work in “/home/user/projects/awesome-project,” you can simply type z
awe to jump there instantly. The more you use it, the better it becomes at predicting your destination.
The installation of zoxide is also quite straightforward, as it is accessible through your default package manager. To install zoxide on Ubuntu, run:
sudo apt install zoxide
After installation, integrate it with your shell by adding the following to your .bashrc or .zshrc file:
eval "$(zoxide init bash)"
Apply the changes without restarting your terminal session by running:
source ~/.bashrc
Next, start using z
instead of cd
and experience how effortlessly you can navigate your filesystem.
5. Ripgrep
Have you ever tried to locate where a particular function is defined in thousands of lines of code? With ripgrep, not only is it quicker, but it’s also more accurate, as it ignores irrelevant files and directories by default.
Built with Rust, ripgrep is designed for speed and efficiency, outperforming traditional tools like grep. It’s particularly convenient for developers who need to search through large code repositories.
Use your default package manager like APT to install ripgrep on Ubuntu:
sudo apt install ripgrep
For example, you can search for a specific pattern in all files within a directory by providing the pattern and directory as arguments:
rg 'pattern' directory_name
You’ll get a list of matches, complete with file names and line numbers.
6. Tmux
Tmux enables you to divide your terminal window into multiple panes, create several windows, and even disconnect from sessions to resume them later.
The true power of tmux shines when working on remote servers. I once managed a session on a remote server for weeks, handling a long-running task. I could disconnect, work on other things, and return later without losing progress.
To install tmux on Debian-based systems, run this:
sudo apt install tmux
Once installed, simply use tmux
command to begin a new session. Additionally, you can create new windows within tmux using Ctrl + b + c, switch between them with Ctrl + b + n (next) and Ctrl + b + p (previous), and split panes using Ctrl + b + % (vertical split) and Ctrl + b + ” (horizontal split).
7. Fzf
Fzf, short for fuzzy finder, integrates with your shell to provide an interactive way to search for files, directories, command history, or even text within files using fuzzy matching. You type a few characters, and fzf displays matching items in real time.
With fzf, you don’t need to remember exact file names – just parts of them. This is particularly effective when working with large projects or numerous files.
You can get fzf by using the default package manager, such as using APT on a Debian-based system:
sudo apt install fzf
Typing fzf
in the terminal opens an interactive window where you can type to filter and select files. Additionally, It integrates well with other tools like ripgrep or Vim and can be used to enhance your command-line experience significantly.
8. Bat
Bat is a modern alternative to cat that not only displays file content but also adds syntax highlighting, displaying line numbers, Git integration, and more.
What I love most about bat is how it automatically handles different file types. Whether you’re looking at source code, markdown files, or configuration files, bat applies the appropriate syntax highlighting and makes the content much more readable.
Just like any other mentioned tools, you can also get this from your default package manager. For example, on Debian-based systems, execute this:
sudo apt install bat
Now, when you want to view a file’s contents, simply use:
bat filename.txt
Note: On Ubuntu/Debian, bat
command becomes batcat
due to a naming conflict with a Bacula package. However, if you still decide to use a bat
, then simply create a Bash alias to map batcat
to bat
.
So, there you have it! These tools have changed how I interact with the command line. By using these tools, you can also significantly enhance your productivity and make working in the terminal a more enjoyable experience.
Have you tried any of these, and what has your experience been like? Furthermore, you can try other fun Linux commands or commands that new users can use.
Image credit: Mohammad Rahmani via Unsplash. All alterations and screenshots by Haroon Javed.
Haroon Javed –
Contributor
Haroon is a lifelong tech enthusiast with over five years of experience writing thousands of articles about Linux, programming languages, and more. He loves exploring new technologies and experimenting with them to find innovative ways to use them. Haroon’s work has been featured on various online platforms, including HTG, Baeldung, and LinuxHint.
Subscribe to our newsletter!
Our latest tutorials delivered straight to your inbox
Sign up for all newsletters.
By signing up, you agree to our Privacy Policy and European users agree to the data transfer policy. We will not share your data and you can unsubscribe at any time. Subscribe