Useful Command Line Tools in 2023
Tags: commandline, tools, terminal, productivity
Published: 2022-07-27 12:11:00

These are some of the tools that have made my life in the terminal so much easier over the last years. Also, all of them work inside WSL2 without any hassle.

My other lists: 
- [Fantastic (and lesser known) VIM Plugins](https://dev.to/hackingcpp/fantastic-and-lesser-known-vim-plugins-in-2022-12e6 ) 
- [Great Coding Fonts](https://dev.to/hackingcpp/great-fonts-for-coding-in-2022-39if)

---
## [nnn](https://github.com/jarun/nnn)
A super fast, fully-featured terminal file manager with a minimalistic interface and less/VIM-like keybindings (navigation with `h``j``k``l`, search with `/`,...). Also offers some useful plugins like instant preview, "open with", "go to git main directory", etc. Can also be used as quick file system navigator (can change to last active dir on exit).
As an alternative to the usually pretty outdated versions in OS packages you can just donwload one of the statically linked executables on the [GitHub release page](https://github.com/jarun/nnn/releases).
![nnn screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cyblsabnfg2z2z87ybpr.png)
  
---
## [broot](https://dystroy.org/broot/)
Fast file browser and manager that displays a tree that is automatically partially collapsed so it fits the terminal height. By default the primary mode of navigation is a super-fast search, but one can also switch to a VIM-like modal interface. Broot offers working with multiple panes and a staging area for operations on multiple files. The instant preview pane can also diplay images right out of the box.
Broot runs on Linux, Android, Windows 10+ and OSX. Binaries can be downloaded [from here](https://dystroy.org/broot/install).
```
cargo install --locked --path .
pkgin install broot 
emerge broot
apk install broot
port install broot
```
![broot screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d1ahz42u3jj0nvuoriu9.png)

---
## [exa](https://the.exa.website)
An improved file lister with more features and better defaults. It uses colors to distinguish file types and metadata. It knows about symlinks, extended attributes, and Git. And it's small, fast, and just one single binary.
```
apt install exa 
dnf install exa
emerge sys-apps/exa
nix-env -i exa
pacman -S exa
zypper install exa
brew install exa 
```
![exa screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/okp8zd73256rwtwhr6b8.png)

---
## [ncdu](https://dev.yorhel.nl/ncdu)
A disk usage analyzer with an ncurses interface. It is designed to find space hogs on a remote server where you don't have an entire graphical setup available, but it is a useful tool even on regular desktop systems. 
Packages are available for almost all operating systems.
```
apt install ncdu
```
![ncdu screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kej5xgfibogseq3t4use.png)
  
---
## [duf](https://github.com/muesli/duf)
disk usage/free utility
```
apt install duf
nix-env -iA nixpkgs.duf
pacman -S duf
pkg install duf
pkg_add duf
xbps-install -S duf
brew install duf
choco install duf
scoop install duf
```
![duf screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8ecqjh996eyfb5745fp9.png)

---
## [fasd ](https://github.com/clvv/fasd)
A command-line productivity booster. Fasd offers quick access to files and directories for POSIX shells. It is inspired by tools like autojump, z and v. Fasd keeps track of files and directories you have accessed, so that you can quickly reference them in the command line.
```
apt install fasd
dnf install fasd
pacman -S fasd
brew install fasd
```
![fasd screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5hiru3trtelcqhk6zex5.png)
 
---
## [fd](https://github.com/sharkdp/fd)
A simple, fast and user-friendly alternative to find.
```
apt install fd-find
```
![fd screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qquk0q1c3mt69j5175u8.png)
  
---
## [ripgrep](https://github.com/BurntSushi/ripgrep)
A line-oriented search tool that recursively searches the current directory for a regex pattern. Orders of magnitude faster than grep. By default, ripgrep will respect gitignore rules and automatically skip hidden files/directories and binary files. 
```
apt install ripgrep
dnf install ripgrep
emerge sys-apps/ripgrep
pacman -S ripgrep
pkg install ripgrep
brew install ripgrep
choco install ripgrep
scoop install ripgrep
```
![ripgrep screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w1mx8h42l47yegd93ith.png)

---
## [fzf](https://github.com/junegunn/fzf)
A general-purpose command-line fuzzy finder. It's an interactive Unix filter for the command-line that can be used with any list; files, command history, processes, hostnames, bookmarks, git commits, etc.
```
apt install fzf
apk add fzf
dnf install fzf
nix-env -iA nixpkgs.fzf
pacman -S fzf
pkg install fzf
pkg_add fzf
pkgin install fzf
xbps-install -S fzf
zypper install fzf
brew install fzf
choco install fzf
scoop install fzf
conda install -c conda-forge fzf
```
![fzf screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yn27azub5qvrfvzchj8w.png)

---
## [f2](https://github.com/ayoisaiah/f2)
A cross-platform command-line batch renaming tool. By default it does a "dry run" and previews the replacement. It supports regex, string case operations, indexing, special placeholder variables for path /  dates / EXIF fields / Exiftool fields / ID3 fields and much more. It can even undo the last batch operation.
```
go install github.com/ayoisaiah/f2/cmd/f2@latest
```
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nwbml5nhrkngsyhtdnla.png)

---
## [peco](https://github.com/peco/peco)
Simplistic interactive tool for on-the-fly filtering. Useful for filtering stuff like logs, process stats.
```
apt install peco
pacman -S peco
brew install peco
choco install peco
```
![peco screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p8duznmtjb3yemqw7ziw.png)

---
## [bat](https://github.com/sharkdp/bat)
A 'cat' clone with syntax highlighting and Git integration. 
```
apt install bat
apk add bat
pacman -S bat
dnf install bat
emerge sys-apps/bat
pkg install bat
pkg_add bat
nix-env -i bat
zypper install bat
port install bat
choco install bat
scoop install bat
```
![bat screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wzutyqamcvk9pordy5vr.png)
 
---
## [multitail](https://www.vanheusden.com/multitail)
Lets you view one or multiple files like 'tail'. The difference is that it creates multiple windows on your console (with ncurses). It can also monitor wildcards: if another file matching the wildcard has a more recent modification date, it will automatically switch to that file. 
```
apt install multitail
brew install multitail
```
![multitail screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vm9ilolt7xyzc1v58jzr.png)
 
---
## [colortail](https://github.com/joakim666/colortail)
Works like 'tail' but can optionally read one or more config files where it's specified which patterns results in which colors. Colortail uses regular expressions to determine which lines and parts of lines to print in which colors.
```
apt install colortail
brew install colortail
```

---
## [colordiff](https://www.colordiff.org)
A wrapper for 'diff' that produces the same output but with pretty syntax highlighting. Colour schemes can be customized.
```
apt install colordiff
brew install colordiff
```
![colortail screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6gc67kf3d0jzueqtmbeu.png)
 
---
## [tmux](https://github.com/tmux/tmux/wiki)
A terminal multiplexer. It lets you switch easily between several programs in one terminal, detach them (they keep running in the background) and reattach them to a different terminal.
```
apt install tmux 
dnf install tmux
pacman -S tmux
port install tmux
yum install tmux
zypper install tmux
brew install tmux 
```
![tmux screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9swp5053743qhfiol9g4.png)
 
---
## [tldr](https://tldr.sh)
The tldr pages are a community effort to simplify the beloved man pages with practical examples. Support for multiple languages.
```
apt install tldr 
npm install -g tldr
```
![tldr screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/acaw93kuzqrutxaguxgy.png)
 
---
## [The Fuck](https://github.com/nvbn/thefuck)
Corrects errors in previous console commands.
```
pip install thefuck
```
![thefuck screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1fdgcvompvv6mkf4g70k.png)
 
---
## [tig](https://jonas.github.io/tig)
An ncurses-based text-mode interface for git. It functions mainly as a Git repository browser, but can also assist in staging changes for commit at chunk level and act as a pager for output from various Git commands.
```
apt install tig
nix-env -i tig
pkg install tig
brew install tig
tig is part of [git for windows](https://gitforwindows.org/)
```
![tig screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v77bl4t47mnn7od50kf5.png)
 
---
## [cgdb](https://cgdb.github.io)
A lightweight curses (terminal-based) interface to GDB. It provides a split screen view that displays the source code as it executes. The keyboard interface is modeled after VIM.
```
apt install cgdb
```
![cgdb screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ilfdy34rgibtwo4zy4xa.png)
  
---
## [hyperfine](https://github.com/sharkdp/hyperfine)
Benchmarking of executables similar to the classic 'time' command but much more sophisticated.
 - statistical analysis across multiple runs
 - supports arbitrary shell commands
 - constant feedback
 - warmup run
 - cache-clearing commands
 - statistical outlier detection
 - export results to various formats
 - parameterized benchmarks
 - cross-platform
```
Ubuntu: 
  wget https://github.com/sharkdp/hyperfine/releases/download/v1.14.0/hyperfine_1.14.0_amd64.deb
  sudo dpkg -i hyperfine_1.14.0_amd64.deb
Other:
  dnf install hyperfine 
  pacman -S hyperfine 
  apk add hyperfine 
  nix-env -i hyperfine 
  brew install hyperfine 
```
![hyperfine screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/33f7d1gszt9gl4piy396.png)

---
## [nvtop](https://github.com/Syllo/nvtop)
htop-like performance monitor for GPUs
Works for GPUs from
 - NVIDIA (Kepler and newer)
 - AMD (requires kernel >= 5.14) 
 - Intel (requires kernel >= 5.19) 
```
  apt install nvtop
  pacman -S nvtop
```
![nvtop screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b7dcoo5enwnbb69stvt7.png)

---
## [bitwise](https://github.com/mellowcandle/bitwise)
A multi base calculator supporting dynamic base conversion and bit manipulation. Also offers an interactive mode navigation. A handy tool for low level hackers.
```
apt install bitwise
snap install bitwise 
zypper install bitwise 
brew install bitwise 
port install bitwise 
```
![bitwise screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r5xhnrn77wohauverl6b.png)
 
---
## [fx](https://github.com/antonmedv/fx)
JSON viewer with less/VIM-like key mappings and mouse support.
Nice for browsing large JSON documents; key navigation, (recursive)
folding/unfolding, searching, etc.
```
pkg install fx
snap install fx
brew install fx
scoop install fx
```
![fx screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wr85b5ydru0wchch65c2.png)
 
---
## [jq](https://github.com/stedolan/jq)
A lightweight and flexible command-line JSON processor.
```
apt install jq
dnf install jq
pacman -S jq
pkg install jq
pkgutil -i jq
zypper install jq
brew install jq
port install jq
chocolatey install jq
```
![jq screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w5rlalj1af50wk9gqkiu.png)
 
---
## [yq](https://github.com/mikefarah/yq)
A lightweight and portable command-line YAML, JSON and XML processor. yq uses jq like syntax but works with yaml files as well as json and xml. It doesn't yet support everything jq does - but it does support the most common operations and functions, and more is being added continuously.
```
snap install fx
brew install fx
```

---
## [pandoc](https://pandoc.org)
Tool to convert between markup formats. Supports docx, epub, fb2, jira, latex, markdown, man, muse, odt, org, rtf, textile, asciidoc, html and more.
```
apt install pandoc
dnf install pandoc 
pacman -S pandoc
brew install pandoc 
choco install pandoc
winget install pandoc
```

---
## [aiksaurus](http://aiksaurus.sourceforge.net)
A command-line thesaurus (English only). 
```
apt install aiksaurus
```
![aiksaurus screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q4b0uwx2wmsig0641hxx.png)
 
---
## [grip](https://github.com/joeyespo/grip)
Previews GitHub flavored markdown files using GitHub's API. The styles and rendering come directly from GitHub, so you'll know exactly how it will appear. Changes you make to the file will be instantly reflected in the browser without requiring a page refresh.
```
brew install grip 
pip install grip
```

---
## [pdf2svg](https://github.com/dawbarton/pdf2svg)
A simple PDF to SVG converter using the Poppler and Cairo libraries.
```
apt install pdf2svg
yum install pdf2svg
```
[Windows Binaries](https://github.com/jalios/pdf2svg-windows)

---
## [imagemagick](https://imagemagick.org)
Tool to create, edit, compose, or convert digital images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, GIF, WebP, HEIC, SVG, PDF, DPX, EXR and TIFF. ImageMagick can resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.
```
apt install imagemagick
brew install imagemagick 
```
[Download Page](https://imagemagick.org/script/download.php)

---
## [pastel](https://github.com/sharkdp/pastel)
A tool to generate, analyze, convert and manipulate colors. It supports many different color formats and color spaces like RGB (sRGB), HSL, CIELAB, CIELCh as well as ANSI 8-bit and 24-bit representations.
```
apt install pastel
pacman -S pastel 
brew install pastel 
scoop install pastel
```
![pastel screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hwjctgqa725kj0iwf7ix.png)
 
---
## [deadlink](https://github.com/nschloe/deadlink)
Parses text files for HTTP URLs and checks if they are still valid.
```
pip install deadlink
```

---
## [asciinema](https://asciinema.org)
Lets you record terminal sessions and replay them in a terminal as well as in a web browser.
```
apt install asciinema
brew install asciinema 
pip install asciinema 
```

---
## [epy](https://github.com/wustho/epy)
A command line ebook reader. A fork of [epr](https://github.com/wustho/epr) with more features: progress percentage, bookmarks, dictionary integration, bold/italic formatting. Supported formats: Epub, FictionBook (fb2), Mobi, AZW3.
```
pip3 install epy
```
![epy screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/atb9n5ndv27thlq72bis.png)