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
    0
    ·
    11 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

  • gandalf_der_12te@discuss.tchncs.de
    link
    fedilink
    arrow-up
    0
    ·
    11 days ago

    losetup

    it’s useful for dealing with virtual disk images. like a real physical hard disk, but it’s a file on the computer. you can mount it, format it, and write it to a real physical disk.

    it’s sometimes used with virtual machines, with iso images, or when preparing a bootable disk.

  • kyub@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    0
    ·
    13 days ago
    • awk
    • the (usually rust-based) coreutils “alternatives” like bat, fd, eza, procs
    • trash-put (rm with trash integration. But beware that it also operates on directories by default, which rm only does with -r. There should be an option to change that behavior but there isn’t. Don’t alias rm to this)
    • wl-copy/paste (or the older one for X11, ‘xclip’ IIRC. Enables you to do stuff like “cat image.jpg | wl-copy” to copy it to the clipboard. Best alias it to something shorter)
    • xdg-open (open the file using your associated program for that file type. Alias to “o” or so)
    • pass (awesome password manager, when you have a GPG key pair. Even better in combination with e.g. wofi)
    • notify-send (to send GUI notifications from shell scripts)
    • ledger (plain-text accounting software. If you use Emacs you should take a look at this as it’s written by an Emacs dev, and has good integration of course)
    • nc
    • nohup
  • TurboWafflz@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    13 days ago

    I’m not sure how underrated it is but the exec feature in find is so useful, there are so many bulk tasks that would just be incredibly difficult otherwise but instead are just one line

      • JackbyDev@programming.dev
        link
        fedilink
        English
        arrow-up
        0
        ·
        edit-2
        12 days ago

        Came here to say both of these things. (Awk and “> simple”.)

        To be totally honest, I don’t think awk is any more complicated than something like grep, it’s just that regular expressions get used more often so they’re typically more familiar. In the same way that programming languages with c-like syntax (like Java and C#) often feel easier than ones that don’t (like Haskell and Clojure).

    • kablammy@sh.itjust.works
      link
      fedilink
      arrow-up
      0
      ·
      11 days ago

      I love httpie for hitting urls when i want to see the headers or body without downloading to a file eg testing an api

  • Semi-Hemi-Lemmygod@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    13 days ago

    I’m a big fan of screen because it will let me run long-running processes without having to stay connected via SSH, and will log all the output.

    I do a lot of work on customers’ servers and having a full record of everything that happened is incredibly valuable for CYA purposes.

    • Static_Rocket@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      13 days ago

      I’d recommend tmux for that particular use. Screen has a lot of extras that are interesting but don’t really follow the GNU mentality of “do one thing and do it well.”

      • kitnaht@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        13 days ago

        Tmux / Screen is like the emacs/vim of the modern day Linux I think.

        Screen is more than capable, but for those who have moved to Tmux, they will absolutely advocate for it.

      • darklamer@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        0
        ·
        13 days ago

        When tmux was first released I was already so used to screen that I never really considered switching. What would some convincing arguments be for me to make the effort to switch now?

        • kablammy@sh.itjust.works
          link
          fedilink
          arrow-up
          0
          ·
          11 days ago

          This was a few years ago so maybe it has improved, but I found that screen would crash and lose my session history and layout too often. That was bad enough, but when it happened it had some bullshit error message about a dungeon roof falling in. I don’t mind some comedy in code or even the interface, but don’t make light of the user losing their stuff. I tried tmux and it is much more stable than screen was.

        • Static_Rocket@lemmy.world
          link
          fedilink
          English
          arrow-up
          0
          ·
          13 days ago

          Tmux was purpose built for terminal multiplexing. You can assign session names for organizing and manipulating multiple instances. Send keys to and read output from detached sessions. It’s easy to script.

    • surfrock66@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      13 days ago

      I know everyone likes tmux but screen is phenomenal. I have a .screenrc I deploy everywhere with a statusbar at the bottom, a set number of pre-defined tabs, and logging to a directory (which is cleaned up after 30 days) so I can go back and figure out what I did. Great tool.

  • hperrin@lemmy.ca
    link
    fedilink
    English
    arrow-up
    0
    ·
    13 days ago

    I know tmux is incredibly popular, but a good use case for it that isn’t common is teaching people how to do things in the terminal. You can both be attached to the same tmux session, and both type into the same shell.

      • menas@lemmy.wtf
        link
        fedilink
        arrow-up
        0
        ·
        11 days ago

        I was surprise to learn that we couldn’t remove remove metadata from video zith exiftool but have to use ffmpeg

    • deadcream@sopuli.xyz
      link
      fedilink
      arrow-up
      0
      ·
      13 days ago

      I use it occasionally but every time I need to do something a tiny bit more complex than “extract field from an object” I have to spend half an hour studying its manual, at which point it’s faster to just write a Python script doing exactly what I need it to do.