Tools for the Modern Linux Learner

If you're trying to learn *nix command line, whether you're on a Mac, Linux, the Linux subsystem in Windows or something else, here's a few points you might find useful:

In my opinion, don't try to learn every command deeply, but rather learn the basics, take a while to get used to it, then circle back for more detail. Use man to learn what you need, when you need it.


Idan Kamara created a really useful site called « ExplainShell » that graphically shows what linux commands do. For example:

https://www.explainshell.com/explain?cmd=tar%20xzvf%20archive.tar.gz

It kind of looks like what you’d draw on a whiteboard, if you were giving a lecture on a particular command.

In a similar vein is https://cheat.sh/, from @igor_chubin.


If you want to share your terminal sessions with other learners, try out the free and open source «@Asciinema» service, which lets you record your terminal sessions for sharing. Slick.


If you need a remote Linux server to learn on, create an account at sites like ctrl-c.club, tilde.club or tilde.town.


Zsh is a good interactive shell to use. «Zsh for Humans» (z4h by @romkatv on GitHub) is a configuration for z-shell that just works and works well. It has a killer ssh wrapper feature, that lets you auto-push your zsh environment up to a remote server, and is pre-configured with the most useful stuff. That is not to even mention the awesome prompt it includes: powerlevel10k.

Edit 20221204: zsh4humans isn't maintained per the github repo, so you might want to check out zim instead.


« Dasel » from Tom Wright @tomwright1993, is a truly cool tool. It uses a standard DAta SELector syntax, so you can learn it once, then use it for converting and querying files of various oft-used types. 🆒

It lets you do something similar to jq or yq, but it supports JSON, YAML, TOML, XML or CSV. Say you have a simple json file which you need in yaml. Just do this:

> dasel select -f website.json
{
  "ErrorDocument": {
    "Key": "404.html"
  },
  "IndexDocument": {
    "Suffix": "index.html"
  },
  "RoutingRules": [
    {
      "Condition": {
        "KeyPrefixEquals": "/"
      },
      "Redirect": {
        "ReplaceKeyWith": "index.html"
      }
    }
  ]
}

Easily convert to yaml like this:

> dasel select -f website.json -p yaml
ErrorDocument:
  Key: 404.html
IndexDocument:
  Suffix: index.html
RoutingRules:
- Condition:
    KeyPrefixEquals: /
  Redirect:
    ReplaceKeyWith: index.html

And boom.


If you need a super simple way to cryptographically sign a file, such as a software release, try « minisign », from @jedisct1.


« Dolt is git for data » as their repo says. 😎 A SQL database with git features, Dolt lets you push, pull, clone, branch, merge, do all the git things as well as all the sql things.

There's even DoltHub, where you can host public data such as this holidays dataset. It has tools like permissions, and a SQL query interface as well.


Try substituting «bat» for cat. Bat is a fast (written in Rust) cat clone with syntax highlighting for programming and markup languages, integration with your $PAGER, and git index awareness.


« Exa » (@dot_slash_exa) is a superb modern and fast ls replacement that supports colors, file and filesystem info, tree view, git info, and wide view. You have plenty of compute power, so why not take advantage of it and use something better than ls.


When you cannot dig dig for cli dns lookup, you might try « dog », written in Rust by Benjamin Sago @cairnrefinery (who also wrote the lovely exa) or « q », written in Go by Nate Sales. 😎

I especially like how you can output json from dog for consumption by another program for say, pushing to a database:

{
> dog esolia.com A AAAA MX TXT --json | jq
"responses": [
  {
    "additionals": [],
    "answers": [
      {
        "address": "99.84.138.103",
        "class": "IN",
        "name": "esolia.com.",
        "ttl": 26,
        "type": "A"
      },
      {
        "address": "99.84.138.27",
        "class": "IN",
        "name": "esolia.com.",
        "ttl": 26,
        "type": "A"
      },
      {
        "address": "99.84.138.119",
        "class": "IN",
        "name": "esolia.com.",
        "ttl": 26,
        "type": "A"
      },
      {
        "address": "99.84.138.118",
        "class": "IN",
        "name": "esolia.com.",
        "ttl": 26,
        "type": "A"
      }
    ],
    "authorities": [],
    "queries": [
      {
        "class": "IN",
        "name": "esolia.com.",
        "type": 1
      }
    ]
  },
  {
    "additionals": [],
    "answers": [],
    "authorities": [],
    "queries": [
      {
        "class": "IN",
        "name": "esolia.com.",
        "type": 28
      }
    ]
  },
  {
    "additionals": [],
    "answers": [
      {
        "class": "IN",
        "exchange": "alt1.aspmx.l.google.com.",
        "name": "esolia.com.",
        "preference": 5,
        "ttl": 300,
        "type": "MX"
      },
      {
        "class": "IN",
        "exchange": "alt2.aspmx.l.google.com.",
        "name": "esolia.com.",
        "preference": 5,
        "ttl": 300,
        "type": "MX"
      },
      {
        "class": "IN",
        "exchange": "aspmx.l.google.com.",
        "name": "esolia.com.",
        "preference": 1,
        "ttl": 300,
        "type": "MX"
      },
      {
        "class": "IN",
        "exchange": "aspmx2.googlemail.com.",
        "name": "esolia.com.",
        "preference": 10,
        "ttl": 300,
        "type": "MX"
      },
      {
        "class": "IN",
        "exchange": "aspmx3.googlemail.com.",
        "name": "esolia.com.",
        "preference": 10,
        "ttl": 300,
        "type": "MX"
      }
    ],
    "authorities": [],
    "queries": [
      {
        "class": "IN",
        "name": "esolia.com.",
        "type": 15
      }
    ]
  },
  {
    "additionals": [],
    "answers": [
      {
        "class": "IN",
        "message": "google-site-verification=K4Vo3d0t6V11dXkV2nWU-H0srafI_UVPtlCvKvN2npQ",
        "name": "esolia.com.",
        "ttl": 300,
        "type": "TXT"
      },
      {
        "class": "IN",
        "message": "keybase-site-verification=JldStq9k7lM6uosSy-za3ilkJo0mlnqSulhYIGMgbpQ",
        "name": "esolia.com.",
        "ttl": 300,
        "type": "TXT"
      }
    ],
    "authorities": [],
    "queries": [
      {
        "class": "IN",
        "name": "esolia.com.",
        "type": 16
      }
    ]
  }
]
}


Social Photo by Ash Edmonds on Unsplash


You'll only receive email when they publish something new.

More from Rick Cogley
All posts