Modern Linux commands - ready to go
By Tomasz Kuczma
All Linux users know commands like grep
, ls
or ifconfig
but have you ever wondering if there is the contemporary alternative?
Here is my list of modern Linux commands I use every day.
For you convenience, I added apt
command to install them but they are also available on Fedora and Arch using dnf
and pacman
. Check out details in the readme on package’s Github.
htop - colorful top
Both commands list processes managed by kernel in dynamic real-time mode.
htop
does it in a more user friendly way. I use it every day to detect noisy processes.
Github: https://github.com/hishamhm/htop
Install: sudo apt install htop
ip - modern ifconfig
Technically, it is one of iproute2
commands collection for managing network in Linux which replace a bunch of old good tools like ifconfig
, route
, arp
etc.
The simple use case is displaying all information about network interfaces (links) and addresses: ip a
.
It also allows to manipulate links (network interfaces) and IP configuration.
More advanced usage require separate article and understanding of computer networks.
You can add alias ip='ip -c=always'
for colorful output
Repository: https://git.kernel.org/pub/scm/network/iproute2/iproute2.git
Install: sudo apt install iproute2
jq - sed, awk, grep for JSON
An extremely useful tool for web development. It allows you to format and filter JSON data - e.g. returned by web service.
Github: https://github.com/stedolan/jq
Install: sudo apt install jq
ripgrep - faster grep
Faster grep with the ability to filter out stuff that you don’t want to see - binary file match results, files added to .gitignore
file, etc.
Github: https://github.com/BurntSushi/ripgrep
Install: sudo apt install ripgrep
bat - beautiful cat and less
The main problem with cat
is that is displays the entire file to the terminal even if the file has thousands of lines.
less
, from the other hand, handles this use case but still uses interactive mode even if the file has few lines.
bat
solves this problem and supports syntax highlighting.
Github: https://github.com/sharkdp/bat
Install: sudo apt install bat
fd - faster find
It is a faster and more convenient find
command. You can quickly find files you are looking for by just typing fd my_file
.
Searching for files with a specific extension is also easy: fd -e extension
. fd
automatically filter out a lot of garbage output like files added to .gitignore
.
source: https://github.com/sharkdp/fd
You can add alias fd='fdfind'
as fd
was already taken by different program (fd - file & directory maintenance tool)
Github: https://github.com/sharkdp/fd/
Install: sudo apt install fd-find
Don’t forget to tune your prompt!
Prompt is also something that you can tune easily and will make you look like a pro. As a side effect, it might also save you some extra time and make you more productive ;) Check out how to make your shell prompt great again and other articles about Linux .
Software engineer with a passion. Interested in computer networks and large-scale distributed computing. He loves to optimize and simplify software on various levels of abstraction starting from memory ordering through non-blocking algorithms up to system design and end-user experience. Geek. Linux user.