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.

    • Trent@lemmy.ml
      link
      fedilink
      English
      arrow-up
      7
      ·
      1 year ago

      Just commenting to give more love to helix. It’s my favorite “small quick edits” editor.

    • Jumuta@sh.itjust.works
      link
      fedilink
      arrow-up
      7
      ·
      1 year ago

      I heard about helix from you and I’ve used it for a year and a half or so now, it’s by far the best editor I’ve used so far and I can definitely vouch for it

    • ObsidianZed@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      I’ve actually been testing with fish recently coming from zsh, though I might wait until 4.0 fully releases before I make a more conclusive decision to move or not.

      With that said, I remember looking through omf themes and stumbled onto Starship that branched off one of the themes and really liked the concept.

      • jennraeross@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        1 year ago

        Helix is a terminal based text editor. It’s much like vim / neovim, but unlike those editors it’s good to go right out of the box, no configuration or plugins needed to make it work well.

        Topgrade is one I haven’t used, but it looks like its intended purpose is to let you upgrade your apps with one command, even if you use multiple different package managers (I.e. if you were on Ubuntu, you could use it to upgrade your apt packages, at the same time as your snap packages, as well as flatpak, nix, and homebrew if you’ve added those.)

      • deadcream@sopuli.xyz
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        Fish is a replacement of bash that’s a bit more user friendly (has some cool auto completion features out of the box and more sane behaviour like handling of spaces when expanding variables). I personally started to use nutshell recently but unlike fish it’s very different from bash.

        Starship is a “prompt” for various shells (that bit of text in terminal before you enter the command that shows current user and directory in bash). I haven’t used it but AFAIK it has many features like showing current time, integration with git, etc.

        • Ephera@lemmy.ml
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 year ago

          Yep, here’s my Starship prompt, for example:

          So, I have it configured to show:

          • the exit code of the last command (if it’s non-zero),
          • the duration of the last command (if it’s longer than 2 seconds),
          • the time (when the last command ended),
          • the current directory,
          • the current Git branch, and it also shows some Git status information, for example the $ means I have something stashed,
          • and finally the technology in use in a repository/directory, so in this case that repo uses Rust and the compiler version is 1.83.
  • Jumuta@sh.itjust.works
    link
    fedilink
    arrow-up
    36
    arrow-down
    1
    ·
    1 year ago

    I think a lot of people don’t realise that yt-dlp works for many sites, not just YouTube

    I used it recently for watching a video from tiktok without having to use their god awful web UI and it was amazing

    • GenderNeutralBro@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      9
      ·
      1 year ago

      Also works on Twitch with the added benefit of NOT playing ads (you still get breaks, just with a placeholder screen instead of the commercial).

      mpv has yt-dlp support built in, so it can just play the streams directly.

    • gnuhaut@lemmy.ml
      link
      fedilink
      arrow-up
      4
      ·
      1 year ago

      Since everyone keeps mentioning yt-dlp I gotta ask: what’s wrong with the original youtube-dl? I keep using it, it works, it’s still being updated.

  • jaxiiruff@lemmy.zip
    link
    fedilink
    arrow-up
    27
    ·
    1 year ago

    nano was and still is vital to me learning and using linux, I will not learn how to use vim so if the distro forces it to be default im not using it.

    Why is editing text so convoluted for seemingly no reason… also hate that vim must be used for certain files.

      • jaxiiruff@lemmy.zip
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        one of my favorite linux youtubers is named vimjoyer so maybe one day I will try to learn it

    • TimeSquirrel@kbin.melroy.org
      link
      fedilink
      arrow-up
      13
      arrow-down
      5
      ·
      1 year ago

      It’s for people to memorize hundreds of arcane shortcuts and shit so they can feel like a smug hacker and gloat over the rest of us using other editors and getting just as much done as they are.

      Also for graybeards that haven’t realized it’s not 1985 anymore.

      • Dran@lemmy.world
        link
        fedilink
        arrow-up
        13
        arrow-down
        1
        ·
        1 year ago

        For the average user you’re definitely right, but I will say for the sysadmin of headless systems, having a powerful cli editor is a godsend. While it may seem arcane and unnecessary, learning vim is easier than managing remote x or sshfs or copying files to and from a system.

        I didn’t learn vim to be a contrarian; I learned it because it seemed (and still seems to be) the path of least resistance for many workflows.

      • Karmmah@lemmy.world
        link
        fedilink
        arrow-up
        6
        ·
        1 year ago

        It’s for people that don’t want a big bulky IDE and are willing to put a little work in to get used to it. I do all my coding in the terminal with vim and tmux and I like the simplicity and that with two dotfiles I can migrate my whole development environment to whatever PC, server or RaspberryPi that I need.

      • Captain Aggravated@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 year ago

        I’ve used Vim for some pretty non-nerdy stuff. Like ripping my DVD collection, when I got to the TV section I had a lot of file names to modify in bulk, and Vim let me do that. Also guitar tablature, the ability to edit plaintext both horizontally and vertically is surprisingly handy. Just having a macro to be able to add a bar line saves a shocking amount of time.

    • N0x0n@lemmy.ml
      link
      fedilink
      arrow-up
      6
      ·
      1 year ago

      Wow you triggered a lot of vim users !

      Maybe give micro a shot :) It’s nano but more sane defaults and comes with customization in mind.

      • jaxiiruff@lemmy.zip
        link
        fedilink
        arrow-up
        3
        ·
        1 year ago

        Cant remember exactly but it had something to do with a file relating to sudo and it only was allowed to be edited with a vim style editor.

        • hersh@literature.cafe
          link
          fedilink
          arrow-up
          6
          ·
          1 year ago

          There’s a separate command called visudo for this purpose.

          You CAN use any ol’ text editor but visudo has built-in validation specific to the sudoers file. This is helpful because sudoers syntax is unique and arcane, and errors are potentially quite harmful.

          • azuth@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            4
            ·
            1 year ago

            But visudo can use any editor if you set SUDO_EDITOR or EDITOR variables. If you don’t want to use vi(m) you should probably set EDITOR in your .bashrc and visudo and probably other programs will use your editor of choice.

        • JPAKx4@lemmy.blahaj.zone
          link
          fedilink
          arrow-up
          2
          ·
          1 year ago

          There may be certain times where it’s all that’s available, I think I remember having to edit fstab in some recovery state in vi

    • jayandp@sh.itjust.works
      link
      fedilink
      arrow-up
      5
      ·
      1 year ago

      Yeah, to this day vim still isn’t intuitive for me, so I just use nano as it’s either often included or simple to install on most Distros.

      Unless a script is hardcoded for vim I haven’t had to use it.

      • lordnikon@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 year ago

        It’s weird but VIM is so powerful and I love it but i also agree it wouldn’t be the default just an option if you needed it. It’s like with notepad ++ on windows it’s wonderful but not everyone needs it from day one notepad will work just fine for basic typing.

    • Karmmah@lemmy.world
      link
      fedilink
      arrow-up
      3
      arrow-down
      2
      ·
      1 year ago

      I used nano when I started but now I am using vim for one year already. I’d recommend taking a few days where you only use vim and I think you will see why people like it. With a few motions you can be much faster than you would be in Nano.

      • n0x0n@feddit.org
        link
        fedilink
        Deutsch
        arrow-up
        3
        ·
        1 year ago

        I’m using Linux since 1998 and still like nano. I can use vi, but prefer nano when it’s available.

      • jaxiiruff@lemmy.zip
        link
        fedilink
        arrow-up
        3
        ·
        1 year ago

        One of the big reasons I switched to nixos is that I mostly need to use the console only for updating my system by editing the configuration file using nano. I do very little besides that thankfully while the GUI side of linux gets better everyday.

  • Boomer Humor Doomergod@lemmy.world
    link
    fedilink
    English
    arrow-up
    23
    ·
    1 year 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
      10
      arrow-down
      1
      ·
      1 year 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
        5
        ·
        1 year 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
        2
        ·
        1 year 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?

        • Static_Rocket@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 year 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.

        • notabot@lemm.ee
          link
          fedilink
          arrow-up
          2
          ·
          1 year ago

          The thing that got me to switch was being able to maintain my pane layout between connections. The various window and pane management niceties (naming, swapping, listing and the like) got me to stay. Now you can keep your screen, but you’d have to pry tmux from my cold, dead, tty.

    • gkak.laₛ@lemmy.zip
      link
      fedilink
      English
      arrow-up
      8
      ·
      1 year ago

      There is also zellij, which can do the same but also has modern functionality specific for development workspaces!

      (Although screen or tmux will still probably be more widely available on remote machines etc)

      • pearsaltchocolatebar@discuss.online
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        I’ve had nohup fail to keep things running after my session ended quite frequently. It’s like it just goes to the next step in the process then gives up.

        • notabot@lemm.ee
          link
          fedilink
          arrow-up
          2
          ·
          1 year ago

          It’s likely that you’re using a systemd based system and the admin hasn’t enabled linger for your user.

          • pearsaltchocolatebar@discuss.online
            link
            fedilink
            arrow-up
            1
            ·
            1 year ago

            The servers are very locked down, so I’m sure that’s part of our compliance requirements. I haven’t looked into fixing it because I just wrote a script to hit Enter every 10 minutes to keep it alive.

            • notabot@lemm.ee
              link
              fedilink
              arrow-up
              1
              ·
              1 year ago

              Ha! Faking key presses, truly an elegant weapon for a more civilized age. If it works, it works.

      • pivot_root@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        It’s not as useful, sadly. Nohup disconnects standard input, output, and error. With screen or tmux, you can reattach them later.

    • villainy@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      1 year ago

      Woah screen is seeing active development again? There was like a decade where it stagnated. So much so that different distros were packaging different custom feature patches (IIRC only Ubuntu had a vertical split patch by default?) Looking at it now, the new screen maintainers had to skip a version to not conflict with forks that had become popular.

      When tmux stabilized I jumped ship immediately and never looked back.

    • surfrock66@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      1 year 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.

  • wasabi@lemmy.eco.br
    link
    fedilink
    arrow-up
    12
    ·
    1 year ago

    I find myself using tldr a lot since finding out about it. It’s just so useful for commands that I don’t use enough to commit to memory.

  • hperrin@lemmy.ca
    link
    fedilink
    English
    arrow-up
    11
    ·
    1 year 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.

  • bamboo@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    12
    arrow-down
    1
    ·
    1 year ago

    dd is probably well known, but one of the simplest and most powerful ways to accidentally delete all data on your hard drive. dd if=/dev/random of=/dev/sda

    • I_Miss_Daniel@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 year ago

      ddrescue (or gddrescue) is a great version if you have a sick drive. It’ll try to copy the good areas first then go back to hammer on the sick areas.

      Not perfect as it doesn’t know about the file system so it tries to copy the entire surface, but generally a good tool.

    • 🜏 Jyan 쟌 🜏@4bear.com
      link
      fedilink
      arrow-up
      4
      arrow-down
      1
      ·
      1 year ago

      @bamboo @mfat , DD, great tool. Utilize it so often, but it is powerful and dangerous. I always double, triple, quadruple check my target disks with multiple programs to avoid destroying my production workstation. Might be best if I just designated a RPi for the job. 😅

    • villainy@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      Great call! pv is deceptively powerful. Being able to see progress and rate limit a pipe is incredibly useful.

  • kitnaht@lemmy.world
    link
    fedilink
    arrow-up
    10
    ·
    1 year ago

    I like https://github.com/aristocratos/btop personally. It’s way prettier than the normal top command which you use to watch processes to find the one that’s hogging all of the CPU or whatever. And it’s not so much that it’s underrated so much as it’s not very well known or distributed by default.

  • TurboWafflz@lemmy.world
    link
    fedilink
    arrow-up
    9
    ·
    1 year 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

    • Daniel Quinn@lemmy.ca
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Just be careful with files with spaces in the name. There’s an incantation with xargs that I always have to look up when I want to use it safely.