Hey everyone, I’m relatively new to linux and was looking for some advice/direction. I have been using Mint Debian Edition for around 6mo or so, and want to learn to use the command line efficiently and proficiently.

I have set up EndeavourOS on a backup laptop I have and have been playing with it, reading the Arch Wiki and such, but I feel like I’m not necessarily learning why I’m doing things, just doing what has worked for others.

So here I am. I guess I’m looking for recommendations for books or articles (physical or online) that can help me to learn and understand the workings on linux, and especially the command line.

Thank you all so much.

  • averyminya@beehaw.org
    link
    fedilink
    arrow-up
    1
    ·
    27 days ago

    There’s a lot of good suggestions here.

    As someone who uses Linux but doesn’t love it, be prepared to restart from scratch a lot. Keep the OS on a blank drive and just point the OS to your storage drives once it’s up and running.

    Otherwise you are going to be losing data every time you break something in the OS, and that is really no fun.

  • rand_alpha19@moist.catsweat.com
    link
    fedilink
    arrow-up
    3
    ·
    27 days ago

    I think, as a Linux beginner also (~10 months), the best way to learn the terminal is to figure out what tools are useful to you and then read the manual pages or [application name] --help (if the application supports that command). Learning how to use grep will also be really helpful for troubleshooting, since sifting through logs is such a pain.

    Like if you want to download a YouTube video, install yt-dlp and then type man yt-dlp into your terminal to learn about how that tool works. You can do this for basic utilities too, like cp, dd, mv, etc. and other applications you have installed. You can also use yt-dlp --help but that won’t open in the parser, just the terminal. Learn by doing things that are relevant to you and branch out from there.

    There are also applications that will let you read the manual pages outside of a terminal, like xman, if you find that useful. After a certain point, you’ll be able to write commands with switches/arguments without needing to check what they mean first.

    • Malgas@beehaw.org
      link
      fedilink
      English
      arrow-up
      2
      ·
      27 days ago

      apropos is also helpful if you want to do something but don’t know what the relevant tools are.

  • pelya@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    27 days ago
    • Ctrl-C will not do what you expect, use Ctrl-Shift-C, or click mouse wheel
    • There are many better terminal emulators that XTerm
    • If you accidentally press Ctrl-Alt-F1, you can press Alt-F7 to switch back to the graphical desktop
    • There are in fact many ways to exit vi, no need to reboot your PC
    • There’s no need to suffer through The True Commandline Experience For Real Fedora-Wearing Sysadmins⁽¹⁾, just install mc and get all the benefits without typing cd and ls every time you want to find a specific file

    ⁽¹⁾ Real Fedora-Wearing Sysadmins don’t use vi to edit files, they either write a sed script or use cat to copy the file to the terminal, then use cat again to copy the contents of the terminal back into the file by clicking the mouse wheel while typing manually the lines they need to change.

  • CrabAndBroom@lemmy.ml
    link
    fedilink
    English
    arrow-up
    2
    ·
    27 days ago

    One of the biggest things that helped me was setting up virtual machines and installing different versions of Linux in them and just playing around. I found it super helpful because it makes you learn different things (for example you mentioned reading the Arch wiki which is a good resource, but not all of it will apply to Mint necessarily) and as an added bonus, it doesn’t matter if you break everything. You can just restore a backup, or better yet, reinstall from scratch so you get used to the process or better yet, keep breaking stuff until you come out the other side and get things working again!

  • some_guy@lemmy.sdf.org
    link
    fedilink
    arrow-up
    3
    ·
    27 days ago

    There’s someone posting a pretty well-crafted intro to Linux series here on Lemmy. Look for that and go to the linked website and dive into the parts that you find interesting. I think they post a course chapter per day in the format of (approximately) “Day 15: Topic for that day.”

    I’ve skimmed some of the course material and thought it useful for beginners. I’m really happy that they keep posting each month.

  • sunzu2@thebrainbin.org
    link
    fedilink
    arrow-up
    1
    ·
    27 days ago

    Using LLM works great since Linux documentation is extensive and was used to train the models.

    Just tell it what you want to do and it will write commands and explain how they work.

    Even models that can run on mid grade consumer GPU can do this now.

    You can set up a docker container for webui and load models in there.

  • Caveman@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    26 days ago

    Step one: Find terminal that’s convenient for you. For me it’s yakuake and some use a runner or whatever.

    Step 2: Find stuff that you do on a regular basis with your computer and do it with the terminal instead. (Open 3 programs, run a steam game or whatever)

    Step 3: Use a bashrc file to make an alias for it.

    Step 4: Find stuff a couple of actions you do the same way every time like open 3 work programs, start torrent + vpn or whatever and put them in a bash function inside bashrc.

    You might not need it though. The terminal is has mostly only two uses in my opinion. Automate stuff and/or do stuff you can’t do with the UI. I use the terminal heavily for work (programming) but hardly otherwise because the best way to break my OS is to change some OS config with terminal commands lol

    • EuroNutellaMan@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      26 days ago

      terminal is also useful as a cross-distro way of doing things and helps avoid cluttered, bad or ugly UIs. Of course the degree at which someone prefers the terminal over a GUI and for which applications is 95% subjective, the other 5% being when either a GUI is pretty much necessary (i.e. image editing) or viceversa (i.e. automation, looking like a l33t h4x0r to impress the ladies/boys/enbies, managing the 3PBs of monkey memes)

  • teawrecks@sopuli.xyz
    link
    fedilink
    arrow-up
    1
    arrow-down
    2
    ·
    26 days ago

    As other’s have said, have a goal. A computer is a tool, use it to accomplish something, try to get something working for yourself that currently doesn’t. If your PC aleady does everything you need it to, great, you’re ahead of everyone else 😅.

    Don’t think of the command line as a good option, it’s archaic, and its capabilities are objectively rudimentary, it’s just often the least bad option because no one has made a convenient GUI for what you’re trying to do (or if they have, they did it poorly, and somehow the command line is still less bad). So you will inevitably have to interact with it.

    • EuroNutellaMan@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      26 days ago

      I think it’s the opposite, GUIs are often convoluted and rudimental compared to the power of the terminal. The terminal can be very sophsticated.

      Just because it’s how we used to do things in the past it doesn’t mean it’s archaic, quite the opposite it’s a very powerful and useful tool that no GUI can ever possibly match, in fact generally GUIs are either for noobs (and I don’t mean this in a derogatory way) and/or convenience, but you can’t really match the ease of automating, power, and freedom a terminal provides when in the hands of someone who understands what they’re doing.

      • teawrecks@sopuli.xyz
        link
        fedilink
        arrow-up
        1
        arrow-down
        1
        ·
        edit-2
        26 days ago

        I’m talking about a properly made GUI, you’re talking about most GUIs. I believe I covered this in my original comment: poorly made GUIs are worse than a terminal interface.

        But don’t act like a linear string of characters, typed in one-by-one is the optimal way to interface with a computer. Obviously, a non-invasive neuralink implant that is able to interpret your intentions with 100% accuracy without uploading any of your data to Elon Musk is the ideal Human Interface Device, but we’re not quite there yet.

        In the meantime, I assume you run a window manager of some kind. Why? Do you regularly browse the internet from the terminal? Unlikely. Why not? Have you ever tried non-linear video editing, image manipulation, or 3D modeling in a terminal? How about debugging multi threaded code, or visualizing allocation patterns? Pored over profiling metrics to root cause a performance issue? And if VR/AR is part of your workflow, trying to use a terminal in concert feels sillier than the hacking montage from Hackers.

        Terminals are objectively more limited than a GUI, because that’s literally the definition of a terminal: a very limited graphical user interface. The advantage of a terminal is that it’s easy (especially for programmers who don’t have an artistic/UX-bone in their body, and are thinking in terms of functions and operands) to make a primitive interface that adheres to a set of expectations. But no one commits every parameter for every command line tool to memory, and even if they did, people don’t want to type out a novel when moving a cursor to a specific region of the screen feels more natural and takes a fraction of the time. (Not that it always feels more natural in every circumstance, but in the times when it does, that’s what every sane person should prefer to do).

        So just like I told OP, the goal shouldn’t be to use a terminal; you should instead focus on solving a problem. The terminal is just often the least bad tool that currently exists to solve a lot of problems.

        • EuroNutellaMan@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          26 days ago

          Terminals are only limited in tasks that require graphics content, what a shocker.

          For all other cases they’re vastly more powerful than any GUI can be, because no developer can (or should, it’s unrealistic to ask them to do this) match the amount of complex operations terminal commands can reach with one string or script. With GUIs you also have to deal with different sets and toolkits, like GTK, Qt, etc etc.

          There’s use-cases where GUIs work better and cases where terminals work better and which ones belong where also depends on the user, but saying terminals are more limited than GUIs and bad is flat out wrong and dishonest.

          • teawrecks@sopuli.xyz
            link
            fedilink
            arrow-up
            1
            ·
            edit-2
            26 days ago

            I think you and I are using two different definitions of the word “powerful”, or are at least applying them to subtly different aspects of the discussion.

            1. I don’t know if you are familiar with basic finite automata theory, but a Finite State Machine is provably less “powerful” than a Turing Machine. This is the definition of “power” that I’m using, “power” as in “expressiveness”. i.e. The fact that you can literally create a terminal as a sub-element within a GUI if you wanted means that a GUI is provably more “powerful” (or more expressive) than a TUI. And thus the best GUI for a tool will always be better than the best TUI for the same tool. (Comparing the worst GUI vs the best TUI is a waste of time).

            2. But you’re using the definition of “powerful” as in a “powerful programming language”. This is a common use of the term, but is much more fuzzy and harder to quantify. It’s no longer synonymous with “expressiveness”. Generally a language is “powerful” if you can get “a lot done” with relatively few characters or operations. Ex. Python is often considered more “powerful” than C because you can do in a single line what would take dozens or hundreds of lines in C. Similarly, you’re saying that a developer can make a comprehensive TUI using less time and effort than it would take for them to make a GUI that’s at least as good (including integration with other tools afforded by pipes and redirects).

            And I agree with you. But hopefully you also agree with me that a GUI is objectively more “expressive” than a TUI, and in that sense has a higher ceiling for how useful it can be to a user.

      • @EuroNutellaMan @teawrecks 100% agree , terminal is the king of computing. GUIs are convenient, sure. However, when I am writing software to do computation, I am definitely not wanting to run it in an environment with a GUI. I want every speck of resources free for my program. It’s easier to write scripts as well expressing the algorithm in my head than it is for me to coordinate settings on a GUI or keyboard inputs.

  • just_another_person@lemmy.world
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    27 days ago

    The only way you’re REALLY going to learn is be actively using things. If everything is just working, GREAT! That’s all you need to know. Just keep enjoying it.

    If there something specific you are using this for, let us know and we might be able to help you out.

    That being said, one of the easiest to force yourself to learn where everything is, is by using the CLI instead of GUI wherever applicable. Install packages, do updates, change settings…etc.

  • MXX53@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    26 days ago

    I have been using terminal almost exclusively for about a decade or more. But, when I started I just decided to do it. And that meant that every time I wanted to do something, it would take me forever because I would have to look it up. Eventually, I got faster and faster and now anything I want to do with a gui, I can almost certainly do faster with terminal.

    • LovePoson@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      25 days ago

      This. Right now you might feel you aren’t learning anything, that you are just copying what says online without understanding it. But little by little, by changing a config line the internet told you, by doing x command to search for y path, you slowly and unknowingly build up your experience with that config file or command. Next time you need to touch that same confg file or command, it’ll be easier, and easier. So on until you just know it and dont need to look it up.

      Give it time. Every small step builds toward the big goal. And if you know how to search and learn from the internet efficiently, you dont even need to ask here for advice. It’ll come naturally

  • Presi300@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    1
    ·
    27 days ago

    The best advice… Just use Linux more… It’s the only way to get familiar with it

    • fuckwit_mcbumcrumble@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      3
      ·
      27 days ago

      Yeah that’s the biggest cure for “learning something and not knowing why”. Instead of just reading to read, try doing things, and when you have a problem or question look it up.

      Want to install multiple programs at once? Google it. Want to search for a program, but it spits out 700 versions? Google how to filter outputs in the command line.

      Unless you just really like reading dry ass documentation then you kinda just have to do it. And when you run into an issue then figure out the fix.

  • UNY0N@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    26 days ago

    In addition to rhe other advice, I’d add what helped me the most: install arch from scratch.

    Use an older PC you have lying around, or just a VM. Use the installation guide on the arch wiki (or a video on feetube if you prefer to listen to a human explain stuff) and just learn as you go.

  • variants@possumpat.io
    link
    fedilink
    English
    arrow-up
    6
    ·
    27 days ago

    I think you need like a project that will give you a goal and things to look up to do specific things. What got me into Linux was running a minecraft realm, then we hit limitations on the service so opted for a server instead which lead down the road to a VPS and had me using Linux and commands