Modern Command Alternatives

Updated on Mar 21, 2025

There are plenty of useful and must know commands as pointed out in the previous article; Must know Linux commands.

Here I will give you some modern alternatives to those commands and some that compliment them.

Table of Contents

Alternatives

Works Well Together

Alternatives

ls & tree > lsd

My current recommendation is called lsd (lsdelux) and I use it in conjunction with vivid to change the colour scheme of ls. lsd provides a much nicer interface and gives you a fully customisable ls command. Bellow I have listed my recommended aliases for lsd.

    ## LSD ## https://github.com/lsd-rs/lsd
    alias ls="lsd -a"
    alias ll="lsd -lah"
    alias tree="lsd --tree"

lsd

https://github.com/lsd-rs/lsd

https://github.com/sharkdp/vivid

cd > zoxide

zoxide is a smarter cd command written in the much loved rust language, it is inspired by z and autojump. It works by building up a library of where you have been using your cd command, once you have been there you can jump to that directory from anywhere and you don't even have to remember exactly where it is or what its called.

    z foo              # cd into highest ranked directory matching foo
    z foo bar          # cd into highest ranked directory matching foo and bar
    z foo /            # cd into a subdirectory starting with foo

    z ~/foo            # z also works like a regular cd command
    z foo/             # cd into relative path
    z ..               # cd one level up
    z -                # cd into previous directory

    zi foo             # cd with interactive selection (using fzf)

    z foo  # show interactive completions (zoxide v0.8.0+, bash 4.4+/fish/zsh only)

https://github.com/ajeetdsouza/zoxide

find > fd

fd is one of the best alternatives to the find command, it is so good that I had actually forgot it isn't the default. It is very fast, simple, powerful and written in rust.

https://github.com/sharkdp/fd

cat > bat

bat is a great alternative to cat, it supports syntax highlighting and will always start you at the top of a file. bat has integrations with git, fzf, ripgrep, fd and many more.

bat https://github.com/sharkdp/bat

grep > ripgrep

ripgrep is a line-oriented search tool that recursively searches the current directory for a regex pattern. Put more simply it will search files for a given search term and then tell you what file and what line number it is on. It is miles faster and much more user friendly than grep, not to mention written in rust.

ripgrep https://github.com/BurntSushi/ripgrep

du > ncdu

du is the disk usage utility and even when passing the flags to make it more human readable its still not great for large directories and can become time consuming trying to narrow down the large files. ncdu solves this by presenting the information in a easy to read and navigate terminal ui (tui). You can navigate between directories in the tui and be able to see all the information with eas and speed.

ncdu https://dev.yorhel.nl/ncdu

sed > sd & jq

For the most part I would argue that sed is fine however when doing more complex replacing it can become messy and complicated. If you do not want to take the time to learn and remember how to use sed then sd is for you. sd is also considerably faster than sed, according to sd they are around 12 times faster.

grep and sed are the usual go to for search and replace however they fall short when it comes to json files as grep does not do any filtering between key and values. This is where jq comes in. You can use it to slice, filter, map and transform structured data with the same ease that sed, awk, grep and friends let you play with text.

sd: https://github.com/chmln/sd

jq: https://jqlang.org/

Works Well Together

git & lazygit

Whereas I do not believe that lazygit can fully replace git, it does bring a nice and rather powerful TUI for git. I think it compliments git very well and is a much faster workflow than manually typing git commands.

man & tldr

The man page for a given program can be very useful but can at times be more information that you may need or you may simply nee a reminder of what the command does. That's where tldr comes in to play.

tldr

mkdir

This next one is not a new program but rather a function that you must place in your rc file (.bashrc, .zshrc, etc.) It is called "mkcd". mkcd will create a new directory and jump into it immediately, this is much faster than the alternative of "mkdir foo" then "cd foo".

    # mkcd
    function mkcd {
      if [ ! -n "$1" ]; then
        echo "Enter a directory name"
      elif [ -d $1 ]; then
        echo "`$1' already exists"
      else
        mkdir $1 && cd $1
      fi
    }