Which Linux command or utility is simple, powerful, and surprisingly unknown to many people or used less often?

This could be a command or a piece of software or an application.

For example I’m surprised to find that many people are unaware of Caddy, a very simple web server that can make setting up a reverse proxy incredibly easy.

Another example is fzf. Many people overlook this, a fast command-line fuzzy finder. It’s versatile for searching files, directories, or even shell history with minimal effort.

  • gandalf_der_12te@discuss.tchncs.de
    link
    fedilink
    arrow-up
    15
    arrow-down
    1
    ·
    5 days ago

    socat - connect anything to anything

    for example

    socat - tcp-connect:remote-server:12345

    socat tcp-listen:12345 -

    socat tcp-listen:12345 tcp-connect:remote-server:12345

  • friend_of_satan@lemmy.world
    link
    fedilink
    English
    arrow-up
    28
    ·
    edit-2
    6 days ago

    Not powerful, but often useful, column -t aligns columns in all lines. EG

    $ echo {a,bb,ccc}{5,10,9999,888} | xargs -n3
    a5 a10 a9999
    a888 bb5 bb10
    bb9999 bb888 ccc5
    ccc10 ccc9999 ccc888
    $ echo {a,bb,ccc}{5,10,9999,888} | xargs -n3 | column -t
    a5      a10      a9999
    a888    bb5      bb10
    bb9999  bb888    ccc5
    ccc10   ccc9999  ccc888
    
    • friend_of_satan@lemmy.world
      link
      fedilink
      English
      arrow-up
      7
      ·
      6 days ago

      I love jq, but I wouldn’t call it “surprising simple” for anything but pretty-formatting json. It has a fairly steep learning curve for doing anything with all but the simplest operations on the simplest data structures.

      • toastal@lemmy.ml
        link
        fedilink
        arrow-up
        1
        ·
        6 days ago

        It’s not even pretty or accessible. 2-spaced indentation is incredibly hard to read.

  • DigitalDilemma@lemmy.ml
    link
    fedilink
    English
    arrow-up
    26
    ·
    7 days ago

    yes

    The most positive command you’ll ever use.

    Run it normally and it just spams ‘y’ from the keyboard. But when one of the commands above is piped to it, then it will respond with ‘y’. Not every command has a true -y to automate acceptance of prompts and that’s what this is for.

  • harsh3466@lemmy.ml
    link
    fedilink
    arrow-up
    29
    ·
    7 days ago

    zoxide. It’s a fabulous cd replacement. It builds a database as you navigate your filesystem. Once you’ve navigated to a directory, instead of having to type cd /super/long/directory/path, you can type zoxide path and it’ll take you right to /super/long/directory/path.

    I have it aliased to zd. I love it and install it on every system

    You can do things like using a partial directory name and it’ll jump you to the closest match in the database. So zoxide pa would take you to /super/long/directory/path.

    And you can do partial paths. Say you’ve got two directories named data in your filesystem.

    One at /super/long/directory/path1/data

    And the other at /super/long/directory/path2/data

    You can do zoxide path2 data and you’ll go to /super/long/directory/path2/data

  • toastal@lemmy.ml
    link
    fedilink
    arrow-up
    11
    ·
    6 days ago

    netstat -tunl shows all open ports on the machine to help diagnose any firewall issues.

  • Serge Matveenko@lemmings.world
    link
    fedilink
    English
    arrow-up
    26
    arrow-down
    1
    ·
    7 days ago

    I don’t see anyone mentions htop. So, I will:) Just works, could be installed in any distro. Much more friendly than top but isn’t bloated with features as some other alternatives are.

  • Count Regal Inkwell@pawb.social
    link
    fedilink
    arrow-up
    12
    ·
    edit-2
    6 days ago

    batcat

    It’s like cat but better. Great for when you just want to look at the contents of a file, without loading a whole text editor.

    Oh also, tldr

    My procedure for learning how to use a cli command goes tldr page -> --help if the tldr fails to help me -> THEN the full manpage

    • tetris11@lemmy.ml
      link
      fedilink
      arrow-up
      6
      arrow-down
      1
      ·
      edit-2
      7 days ago

      Gripes:

      • starship and all these shell frameworks are overbloated. Just write your own prompt command and be done with it.

      • restic, ongoing issue with the author to allow people to backup without a password. Seems lime a no-brainer but he’s being difficult

      • Shimitar@feddit.it
        link
        fedilink
        arrow-up
        3
        arrow-down
        1
        ·
        6 days ago

        Why would you want password less backups?

        I understand if the reason is ‘just because’, but seriously, why? I just write down the password in a text file for restic --password and I am done.

        • tetris11@lemmy.ml
          link
          fedilink
          arrow-up
          6
          ·
          6 days ago

          write down the password where though, somewhere I can guarantee it will always be there 10 years from now? That’s a big ask of me

          • Shimitar@feddit.it
            link
            fedilink
            arrow-up
            3
            ·
            6 days ago

            That is true for lots of things.

            Moreover I use one easy “default” password for all basic stuff, and its always the same known to my spouse and written down on paper.

            At least my offsite backups are protected from prying eyes. Maybe uneeded for local backups, but doesn’t hurt to have.

          • jbrains@sh.itjust.works
            link
            fedilink
            arrow-up
            3
            ·
            edit-2
            6 days ago

            I keep mine in Bitwarden, I export that data every 3 months and store it in a Backblaze backup, I have it written on a piece of paper stored in a locked fire box in my house, and that paper scanned in my phone.

            I can’t imagine not having at least one of those in 10 years and I can’t imagine all four failing in the same week.

            Does that give you any helpful ideas that would work for you?

            • tetris11@lemmy.ml
              link
              fedilink
              arrow-up
              2
              ·
              6 days ago

              None that I can see persisting, as I move around a lot and my backups tend to get boxed up for periods of time before being unboxed. But, I appreciate the effort

          • Shimitar@feddit.it
            link
            fedilink
            arrow-up
            3
            arrow-down
            1
            ·
            6 days ago

            10 years? Boy you are joung :)

            I have encrypted files from w 20 years ago, and unencrypted files from 30 years ago.

            And digitized stuff from analogic of 40 and 50 years ago.