I know we all enjoy being nerds and using commands (H4ckerman). But now that everything is either a gui or web based, is there really any use to terminal commands?

For example, on windows I never used powershell or cmd hardly ever. I realize now I probably could have. But Linux just drives me to use it more, which i like anyway (because let’s be honest, it makes us feel superior)

  • jjjalljs@ttrpg.network
    link
    fedilink
    English
    arrow-up
    1
    ·
    56 minutes ago

    Sometimes it’s easier to type cd ~/D{tab}/M{tab}{enter} open . than using the GUI.

    Plus all the fancy stuff that people do with scripting

  • chloroken@lemmy.ml
    link
    fedilink
    English
    arrow-up
    3
    ·
    3 hours ago

    Using the terminal doesn’t make normal people feel superior, it is simply more efficient to type commands than click UIs.

  • jj4211@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    4 hours ago

    Cmd was torturous and powershell not much better.

    Some things are just massively tedious to do through any gui. Sometimes the converse is true.

    One reason why LLM is desired as a ui element is that you can describe what you want in text without having to remember how to navigate a bunch of convoluted ui elements. CLI is related, except more precise but more demanding on specifics of input.

      • jj4211@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 hour ago

        It’s certainly capable, and has a more structured pipeline structure saving you in theory from awkwardness of grep/awk sorts of ‘processing’ that may be out of whack. It also has a command model where whether you are calling cmdlets or .Net functions, it’s lighter weight than a typical bash interaciton that has to fork/exec every little thing (and the ability to invoke .Net functions means a lot of capabilities that are normally not directly available to something like bash).

        However, from a user experience, it’s got a few things that can be a problem:

        • It’s a bit too ‘programmer-y’, and particularly maybe a bit too perl-y. Some of the same criticisms of how perl can be a bit of a mess carry over to powershell.
        • It’s ecosystem is mostly just whatever Microsoft gives to you. The *nix side of the house has had a diverse ecosystem, but Microsoft is largely on their own. Good hooks into most Microsoft products, but not a whole not of third party enablement.
        • Other shells have better and/or richer UX, like fish
  • Badabinski@kbin.earth
    link
    fedilink
    arrow-up
    4
    ·
    6 hours ago

    My work and personal computers typically have two applications open—a web browser and a terminal (well, really a shitload of terminals). I don’t have a desktop, I have a terminal. I don’t have a graphical file manager, I have a terminal. I’m not doing this because it’s cool, I do it because it’s efficient as all fuck and makes it trivial to fire off one-liners to automate shit.

    Like, I stream a certain video game competitively, and I need to keep recordings if I want to submit runs. I started off recording my gameplay using x264, and the file sizes were too damn big. I tested various av1 options out using ffmpeg on a small sample clip, and when I was done it was simplicity itself to just do this:

    # I'm typing this on my phone so I'm not going to write out the ffmpeg args
    for file in recordings/*.mp4; do ffmpeg "${some_args[@]}"; done
    

    I didn’t have to learn some stupid GUI batch processing thing. I didn’t have to install any extra tools (since I already had ffmpeg). I just took my command, substituted the input and output files for variable names, and looped that shit.

    I feel that the command line is the most efficient interface for a huge number of tasks. Discoverability is awful (although improved with good tab completion and just reading the fucking manual), but the efficiency and composability of a CLI built in the Unix tradition is hard to overstate imo.

  • Pika@rekabu.ru
    link
    fedilink
    English
    arrow-up
    16
    ·
    edit-2
    13 hours ago

    Absolutely!

    First, terminal is, for the most part, distro- and DE-agnostic. Unless you use something specific to the distro or DE (like package management or working with DE dependencies), what would work on one Linux system would also work on the other. This allows you to immediately get a grasp of any Linux system.

    Second, terminal is fast. You can search through GUI for all eternity, or you can type one line that does what you want, saving tons of time in the process.

    With that said, both GUI and terminal should develop hand in hand to provide a user experience that suits both regular and power users alike. Windows commonly shifts to the side of regular user, while making it harder for power users to do what they want. Linux as it was in the old days shifted towards power users.

    Nowadays, I think Linux finally strikes the right balance - it is accessible and powerful at the same time.

    • bridgeenjoyer@sh.itjust.worksOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 hours ago

      Could you elaborate ?

      I’ve always wanted to get into coding but what ive watched/read on something like godot or VBA was all clicking certain boxes in the gui and didnt interest me much. Are you saying like python and scripts ? That makes sense. I have no clue what programmers actually do since ive never been able to find something to apply it to

      • Badabinski@kbin.earth
        link
        fedilink
        arrow-up
        1
        ·
        6 hours ago

        I wrote a program at work that gets deployed to hundreds of thousands of systems and is very hard to fully test or instrument. This program recently had a bug that was hard to track down. Using the command line, I connected to one of these boxes over ssh and ran a series of commands to detect the bug and dump details of what happened. Then, I took all those commands and turned them into a onliner that I could pass in over ssh, so I could get everything I needed for an individual maxhine. I then used xargs to run that command in parallel over every single one of the systems my code was running on and in the end, I was left with a nice directory of files whose name was the IP of an affected system, each filled with useful information. I started by manually running command over ssh, but the composable nature of the shell allowed me to transition that into a script in a matter of minutes.

        I provided a more residential example of why I exclusively use the terminal for file management in a different top level comment.

  • mhz (ex lemm.ee)@lemmy.ml
    link
    fedilink
    English
    arrow-up
    9
    ·
    14 hours ago

    In Linux, GUIs are almost always a front end with limited options for a CLI. Also, with CLI you can chain commands to get even more control.

  • yyprum@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    9
    ·
    edit-2
    14 hours ago

    You’ve got plenty of examples of how the command line is more than jus a “cool” way to do things. So I’ll address a couple other issues.

    On windows you are discouraged to use command line because that way windows gets more control over what you can do or can’t do. Remember windows is not a neutral piece of software, it’s a company’s business model. On Linux there’s no reason to impede using the command line, all the power to you.

    (because let’s be honest, it makes us feel superior)

    I don’t know if it’s because of my autism, but this strike me as odd. Do people really think like this? I have a certain expertise, that’s computers, and I can use a bunch of different tools to the best of my knowledge to do things. I choose command line or GUI depending on how easy the task is to do in each or the time it takes. Not everyone is trying to show off, it’s just the best tool to use sometimes.

    • bridgeenjoyer@sh.itjust.worksOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      6 hours ago

      Yes, just making a joke, however when anyone sees me use Linux even for basic stuff they freak out that im hacking. So the cliche still stands strong.

      Good point on windoze!

    • Garbagio@lemmy.zip
      link
      fedilink
      English
      arrow-up
      6
      ·
      13 hours ago

      The meme of people feeling superior for using CLI is 30 years old. What you have from op is lazy, out-of-date humor. Like sure, there have always been and will always be a minority of people that upon learning a small bit of something will brag about it (in this case how to use a CLI), but mostly it’s just boomer humor. I wouldn’t take it seriously that there are any people of note who feel superior for using a CLI.

      • yyprum@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        3
        ·
        11 hours ago

        Ah I see, thanks for the explanation. So my autism is not to blame, I’m just out of the loop. I mean, yeah, it’s always funny when you see in a movie they put a command line tool just to make it look like someone is a R34L |-|4c|<3r and they are just doing ls and cd but never really knew it was a thing in general too.

        I guess I’ve earned a woosh in the OP’s joke.

  • Liam Mayfair@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    26
    ·
    edit-2
    19 hours ago

    IT guy here. The CLI is not something I’d expect the average computer user to use at all. However, for power users and professionals it’s a force multiplier at least, and a prerequisite often.

    There are several reasons for this. Firstly, IT system and server administration, in the cloud or your own hardware, is often done via the CLI. This is because it’s not that common or convenient to hook up every server in a rack to a monitor to click on stuff. But dialling into it remotely via SSH or even a serial port to perform bootstrapping procedures, troubleshooting and even routine management tasks sometimes, is very quick , easy and reliable.

    The other main reason is automation. If I buy 10 servers to power my website, they all need installing and configuring a whole bunch of software, e.g. an Apache web server, DNS, SQL, Active Directory, AV, firewall, networking, and a host of other services. Now imagine doing all of that by hand. You don’t even need to be a professional sysadmin installing server racks for a living for this to be important. Even if you run a couple desktop/servers/Raspberry Pi/NAS at home, they’ll need updating, upgrading or replacing every once in a while. Having to click your way through everything every time you need to (re)configure them gets old very quickly.

    GUIs are extremely poor at providing a consistent, predictable, automatable way to do things. They force you to do mostly everything manually and be present to supervise the whole thing. With the CLI you can script out pretty much any task and let it run in the background while you go do other things. I really don’t see CLIs going anywhere anytime soon. I’d say it’s actually the opposite. PowerShell was Microsoft’s way of acknowledging this very fact years ago. The primitive Windows Batch scripting language wasn’t cutting it for anyone, especially Windows Server users who had to painstakingly configure every Win Server install they did manually through a GUI wizard.

  • dual_sport_dork 🐧🗡️@lemmy.world
    link
    fedilink
    English
    arrow-up
    50
    ·
    23 hours ago

    Even outside of scripting and so forth, which I use a lot, often it’s far easier and faster to just cook up a wildcard string or a regex or whatever when you’re faced with a folder with eleventy bazillion files in it, only some of which you’d like to move somewhere else.

    Yes, you could point-and-click on all of those for the next hour and a half plucking them all out of your file browser window. Me personally, I’d really rather not.

    Other similar use cases abound.

  • masterofn001@lemmy.ca
    link
    fedilink
    English
    arrow-up
    8
    ·
    17 hours ago

    Pipes etc.

    A GUI can’t combine commands from several different programs and move data to and from and use that with the ease and explicit nature of a terminal.

    • frongt@lemmy.zip
      link
      fedilink
      English
      arrow-up
      1
      ·
      17 hours ago

      GUIs can use pipes just fine. You tell it to write to a named pipe or similar device and the program on the other end will happily consume it.

      • jj4211@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        4 hours ago

        But only if the gui very specifically designs for it. With a cli you can generally wrangle arbitrary command into a pipeline.

        • frongt@lemmy.zip
          link
          fedilink
          English
          arrow-up
          1
          ·
          4 hours ago

          No, if it implements any standard file I/O, it’ll work. Write to a fifo and then consume it with the other application. Or write into the fifo from another application and read it with the GUI app.

          • jj4211@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            ·
            1 hour ago

            The point is that you can’t “pipe GUI output to other command”, the GUI would actually have to serialize things in a useful way and send to that fifo. Similarly you can’t send stuff to it’s stdin and expect it to do anything sane.

            Further, since you can’t seek() in a fifo, a lot of likely GUI applications involving files would break on trying to deal with a fifo. Also the typical GUI app on read doesn’t assume a ‘tail -f’ like approach to arbitrary file inputs.

  • Nollij@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    26
    ·
    23 hours ago

    It really depends on what you mean by “the real world”.

    The most common use for Linux is on servers. For this scenario, not only does the terminal make sense, but it’s often required as there is no GUI installed.

    For Linux on the desktop, the terminal is very much analogous to Windows PowerShell. More casual users can ignore it for most purposes, but may sometimes need it for troubleshooting.

    If you are trying to say that you “know” Linux, say for career development, you absolutely need to know the terminal. Nearly all professional roles will require it.

      • raspberriesareyummy@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        4 hours ago

        I actually do navigate through folder structures typing letters even in a GUI, but the terminal is still way faster for experienced users. And - what’s more important: knowledge acquired for the terminal stays valid for ages - in the linux world now, 30+ years. Whereas a GUI change can be catastrophic to a learned workflow.