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.

  • HotChickenFeet@sopuli.xyz
    link
    fedilink
    arrow-up
    2
    ·
    1 month ago

    Most listed in some form elsewhere, but

    • Ugrep
    • ranger/lf
    • tmux (splitting terminal and detatching/reattaching when I’m sshing onto server, etc)

    I’ve also been enjoying Kate. It’s a decent text editor, but the ability to Ctrl + / to pipe selected lines through any Linux command (Uniq, shuf, etc) is a bit of a superpower for an editor

  • gandalf_der_12te@discuss.tchncs.de
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    2 months ago

    nmap *your_local_ip_address*

    for example

    nmap 192.168.1.43/24 will show you what devices are connected to the local network, and what ports are open there. really useful, for example, when you forgot the address of your printer or raspi yet again.

    you can also use it to understand what ports on your computer are open from an attacker’s perspective, or simply to figure out what services are running (ssh service).

  • gandalf_der_12te@discuss.tchncs.de
    link
    fedilink
    arrow-up
    1
    ·
    2 months 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

  • gerdesj@lemmy.ml
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 months ago

    ip eg:

    # ip a
    # ip a a 192.168.1.99/24 dev enp160
    

    The first incantation - ip address (you can abbreviate whilst it is unambiguous) gets you a quick report of interfaces, MAC, IPs and so on. The second command assigns another IP address to an interface. Handy for setting up devices which don’t do DHCP out of the box or already have an IP and need a good talking to.

    Oh and you can completely set up your IP stack, interfaces and routing etc with it. Throw in nft or iptables (old school these days - sigh!) for filtering and other network packet mangling shenanigans.

  • gandalf_der_12te@discuss.tchncs.de
    link
    fedilink
    arrow-up
    1
    ·
    2 months 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.

  • harsh3466@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    2 months 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
    1
    ·
    2 months ago

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

    • kyub@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 months ago

      netstat is kind of deprecated, ss is more modern (from the iproute2 package) and uses very similar parameters.

  • Jumuta@sh.itjust.works
    link
    fedilink
    arrow-up
    1
    ·
    2 months 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

    • HotChickenFeet@sopuli.xyz
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      1 month ago

      Do you have experience with either ranger, lf, or yazi? I’m wondering how broot compares. Big fan of file ranger, and this looks very similar.

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