I am a Linux beginner/amateur and I have sort of had enough of copy and pasting commands I find on the internet without having a good understanding of how they actually work.

I guess my end goal is to be able to comfortably install and use arch Linux with my own customization’s and be able to fix it when things go wrong.

What tips/ideas do you have for getting better at navigating the terminal, and getting a better understanding of how the os works. What is a good roadmap to follow? And how did you, advanced Linux user, get to the stage your at now?

Edit: my current distro is bazzite just in case you were interested and thanks for all the replies you are all really helpful.

  • boredsquirrel@slrpnk.net
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    3 months ago
    1. You can always use man command and just read through it. If you want less text, use curl cheat.sh/command (learn how to use aliases) or the tools tldr and cheat
    2. Install the fish shell, it makes using the terminal waaay easier, out of the box.
    3. Install Alpaca flatpak, and use tinyllama or bigger LLM models. Tinyllama is already very sufficient at explaining linux commands and more, and runs fine on my reasonably powerful and modern laptop. Other models may be slow as fuck.
    4. Use the terminal only. Log out, Ctrl+Alt+F2 and login, then use some tools.
    $pwd
    cd
    echo
    ls
    cat
    nano
    less
    more
    chmod
    chown
    #your package manager
    lsblk
    dd #be careful!
    udisksctl
    lsusb
    lspci
    curl
    wget
    ...
    

    Note: use the man for these tools and often multiple tools do the same thing

    1. There is this online terminal game/quiz but I cant find its name.
    • thingsiplay@beehaw.org
      link
      fedilink
      arrow-up
      0
      ·
      3 months ago

      Install the fish shell, it makes using the terminal waaay easier, out of the box.

      Not a good idea if the goal is to learn more about Linux. Fish is not compatible to and is different to Bash in some ways, that it would be hard once not using Fish. Also getting help or sharing scripts with others will be problematic, when having a problem and researching it. For someone coming in to Linux and wanting to learn about it, I highly recommend to learn about Bash first and use it at least for months before even thinking about a custom shell. I used Fish too (and I miss some features), so its not like I wouldn’t know what it is.

      Install Alpaca flatpak, and use tinyllama or bigger LLM models.

      Alpaca is nice. GPT4All is also another one (and one that I prefer). Either way, both are good. But again like previous point, I do not recommend to install and use Ai modesl (LLMs) to learn about Linux and to get used to it. Especially the smaller models often hallucinate and lie with false claims. If you don’t know it better and are currently learning, this could be a problem. I highly discourage from installing and learning with an Ai model alongside when you are new to a topic like Linux. Its also not like there wouldn’t be enough good material out there anyway.

      • boredsquirrel@slrpnk.net
        link
        fedilink
        arrow-up
        0
        ·
        3 months ago

        Fish is just a shell, you can still write and execute bash scripts

        Fish is rewritten in Rust btw

        Also the syntax is waay better, it should totally replace bash

        • thingsiplay@beehaw.org
          link
          fedilink
          arrow-up
          0
          ·
          3 months ago

          My point is that Fish is not standard Linux tool. If the goal is to learn more about Linux, it makes more sense to learn about Bash first. I’m not against Fish. For a newcomer its just confusing when researching stuff or reading others scripts in Bash and constantly think about the differences in Bash and Fish. Or if you want to share a script with someone who does not have Fish. I’m not saying Fish is bad or anything like that. I’m just saying for a newcomer its not a good idea to ignore Bash and learn Fish first for someone who is interested into learning more about Linux and its eco system. Fish itself has the better language, no doubt about it and is actually better than Bash. But the quality is not my main concern in the reply.

          • boredsquirrel@slrpnk.net
            link
            fedilink
            arrow-up
            0
            ·
            3 months ago

            As I said. Fish can just be a shell. I only write bash scripts. All bash scripts have #!/bin/bash at the beginning so it doesnt matter.

            I dont know about fish errors. If something doesnt work, I enter bash and then run it again. I enter exit when I am done.

            That does happen but the workaround is easy

            Apart from that, instant suggestions, history, arguments and available commands already help a lot.

            • thingsiplay@beehaw.org
              link
              fedilink
              arrow-up
              0
              ·
              3 months ago

              Fish can just be a shell. I only write bash scripts.

              That’s the exact problem. You deal with two languages. I did that too BTW. Now for someone who is experienced, its fine. But for someone who just started learning about Linux and scripting, its not ideal, as it adds unnecessary complications and friction for a learning process that is already complicated. Because learning Bash is a must do in my opinion. Regardless what custom shell you use.

              After that learning process and getting familiar, one still can decide to use Fish as the interactive shell. But that’s AFTER the initial learning process of the basics of Linux.

  • Max-P@lemmy.max-p.me
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    Just don’t copy paste the commands. Really! Just take the time to understand what the command does, read the manual, and rewrite it yourself instead of pasting it. That alone will help a fair bit and can start guessing what it should be.

    After a while of doing that it stops being a “paste this command to make the service run” and becomes “ask systemd to enable and start the service”. You start associating editing files in /etc with “will probably need to slap a sudo in front of that one”, you start mentally replacing nano/vi/vim/emacs/nvim/sed with your preferred way of editing the file, because you absorb the concept of “this command edits a text file”.

  • fool@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    3 months ago

    Work at the tip of your “paygrade” and try to make immersion as fun as possible. Maybe consider using a different disk for Linux, since mistakes are the best way to learn. (Don’t reinstall just because something broke).

    Here are some fantastic ways to make mistakes:

    1. Install a more involved, but typical, CLI-centric, DIY-friendly distro – from today’s order of difficulty, that’s EndeavourOS, (install is easy, then you can learn one package at a time), Arch Linux (install is hard iff you have trouble with understanding wiki structure, and you’ll want familiarity with what packages you need), and Gentoo (the installation guide is incredible).
    2. Try out new CLI software. The terminal is your friend! Are you gonna back up videos with yt-dlp? Perhaps make a shell script for something? Maybe search the AUR for something cool to try out (underrated function of the AUR: test-driving!). With a terminal, who needs file explorer?
    3. Play a game. Linux games exist… they’re called CTFs ;). Bandit is pretty fun for beginners (try to keep notes! Maybe use Git?): https://overthewire.org/wargames/bandit/
    4. Make unnecessary customizations (“rices”). Your shell can be made sexy (ohmyzsh?). Your lockscreen can be made sexy. Your windows can be made sexy. (And if you break something, don’t reinstall :3). Remember: if you build something pretty and see it every day… absolute epic.
    5. And of course, flex your hands, get your apron on, have fun popping the engine and fixing! How does one ask questions, put in due diligence, Google, read logs (like journalctl or dmesg or --verbose or whatever)? This is a skill you don’t lose – and we’ll be happy to answer a good question.

    Of course all of this depends on where you are (the tip of your paygrade). For pasting commands specifically, as you said… do 'em one at a time – and understand each one.
    Like, what is piping |? Why is xargs after it? Why can one stop ping with CTRL+C? What does man curl say about this weird curl command? How does one even read a manpage well, anyway (and is curl cheat.sh/SOME_COMMAND better)? Why is there so much gpg?

    And at the end of the day… remember how fun this shit is. The engine is open; we’re allowed to look inside. Woohoo!

  • Libb@jlai.lu
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months ago

    I guess my end goal is to be able to comfortably install and use arch Linux with my own customization’s and be able to fix it when things go wrong.

    What tips/ideas do you have for getting better at navigating the terminal, and getting a better understanding of how the os works. What is a good roadmap to follow? And how did you, advanced Linux user, get to the stage your at now?

    You learn by doing and by failing. Like we learned to walk, to write, to drive, to kiss, to speak a foreign language, or even to lace our shoes (and, yep, even that was a heavy trial and error process for toddler-us back then).

    • Install Arch (in a VM, maybe) and while doing so read the Arch Wiki to understand each step, each action and the role of each app you’re asked to install. The Arch Wiki is an impressively well done documentation.
    • Be fine knowing that it will take time to learn anything new (not just Arch, anything), you won’t get good at it the first time. Don’t rush it, take your time.
    • Be fine knowing that you will face issues and will most likely fail at some point, be it to instal Arch or in doing whatever new. There is no other way to learn, for all of us, than by failing and then trying again, over and over. Once again like we learned to walk (by falling on our butt), to lace our shoes (by making a mess) or to kiss (by not doing it great at first).

    Learning takes time and efforts. Perseverance, and humility. There is no shortcut to learning anything that is worth learning, not just Arch. But the reward is also so much worth it. Einstein had to learn calculus, Da Vinci had to learn how to hold a paint brush, and Tolstoy like Flaubert had to learn to write and I’m willing to bet they all made mistakes while they were learning their respective craft.

    Even without referring to geniuses: the first time I tried to install Arch I ran away screaming and swearing I would never touch that thing again. The second time, I had already managed to read a good chunk of the relevant part of the wiki and used it constantly at each step of the process. I still failed at it but at least I understood why I failed and I felt incredibly more… in charge, despite me failing. The third time, I managed to have it running, and to install most the packages I wanted. That was great. There was no fourth time as, as much as I love Arch (which is a lot), I quickly realized using it that constant updates were not what I wanted from my OS and apps (I’m an old-ish user with very basic needs, I’m not even that much of a geek to be honest). So, I switched to the complete opposite of Arch (Debian, another great love of mine I must say). Still, learning and using Arch taught me a lot about Linux in general and about… myself.

    • Artoink@lemm.ee
      link
      fedilink
      arrow-up
      0
      ·
      3 months ago

      I ran Gentoo for several years. It wasn’t Linux From Scratch but it did required a lot of manual work. It also had great documentation. It forced you to learn all of the pieces encompassing the entire OS.

      Arch seems to be the modern equivalent.

    • Strit@lemmy.linuxuserspace.show
      link
      fedilink
      arrow-up
      0
      ·
      3 months ago

      This is really good advise and it all boils down to one attribute. Patience.

      Don’t get disheartened when something does not work the first time. Take a step back. Look at what went wrong and then try again, hopefully without doing the same mistake again.

      Learn the basic tools of Linux and Bash/Posix. cd, ls, cp, mv and rm are some very basic tools, but it is what we use 80% of the time.

      • Libb@jlai.lu
        link
        fedilink
        arrow-up
        0
        ·
        edit-2
        3 months ago

        This is really good advise and it all boils down to one attribute. Patience.

        Thx. Yes, patience is key. As is the ability to

        Take a step back.

        Failing is fine because it’s not about us, it’s not personal. It never is. It’s about learning something and about the process.

  • electric_nan@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    Start running servers if you haven’t already. Use an old computer, or an SBC or VPS and setup some Linux servers. There’s lots of different ways to do it, so mess around and break shit over and over. You can’t help but learn that way, though I would highly suggest you take notes/documentation. This is a habit I’m trying to develop after too long :)

  • LambdaRX@sh.itjust.works
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    Just install Arch, when You follow wiki it’s not that hard. if You will make mistakes during the process, You will gain better understanding of how things works while fixing errors.

    • annoyed-onion@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      3 months ago

      This. The arch wiki is a treasure trove of information. The more you do, the more you’ll learn.

      Also, don’t blindly copy paste configs for editors or window managers. Just slowly build them up based on your own use. It’ll be painful initially but worthwhile in the long run

      • pineapple@lemmy.mlOP
        link
        fedilink
        English
        arrow-up
        0
        ·
        3 months ago

        I think I will try something like manjaro first see what it’s like and then move onto arch.

        • radswid@feddit.org
          link
          fedilink
          arrow-up
          0
          ·
          3 months ago

          That was exactly how I did it some years ago. After 4 or 5 times fixing the X-server after an update (thanks nVidia!) I switched over to Arch. Installed Arch following the Wiki for about 2 hours… failed and started the process of installation again (in about 1.5 hours :P) and succeeded. By failing and trying again I’ve learned a ton. My advise for less frustration: go with Team Red. In my experience AMD graphics cards are much more linux-friendly.

    • Diplomjodler@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      3 months ago

      Certainly a worthwhile endeavour. But I’d recommend doing it in a VM or a secondary machine before jumping right in on your main computer.

      • pineapple@lemmy.mlOP
        link
        fedilink
        English
        arrow-up
        0
        ·
        3 months ago

        Wait I did this to my main drive everything went black is this suposed to happen? will it start working again?

        • Blisterexe@lemmy.zip
          link
          fedilink
          arrow-up
          0
          ·
          3 months ago

          in case you aren’t joking, rm -rf / (albiet with a warning now) will delete allll the files on your system, so everything going black is the expected result.

          rm is remove, the - is to indicate that you want to pass arguments, and r&f are recursive (delete stuff in the folders in this folder) and force (don’t ask for confirmation). The slash afterwards designates the root folder, the folder with everything in it.

          So “rm -rf /” means “remove, recursively and forcefully, everything in the / directory”

  • secret300@lemmy.sdf.org
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    To be honest I’ve been using Linux for years and I still paste commands all the time. The only difference is that now when I am trouble shooting I know what command I need just not the options and how to use it

  • Palacegalleryratio [he/him]@hexbear.net
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months ago

    My advice would be look up The Missing Semester it’s a free online MIT course on how to use the terminal and it will govern you a better understanding of how to use it and Linux more generally. Really helpful to find your way around and give you an intuitive sense of what you’re trying to achieve.

    Then beyond that installing arch is easy with archinstall but it’s probably more helpful to learn about the components of desktop Linux and what they do so that you actually know what you’re doing.

  • Snot Flickerman@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    3 months ago

    For one, stop copying and pasting commands and start learning about the basics of the shell.

    Here’s a basic tutorial from UC Berkeley: https://computing.stat.berkeley.edu/tutorial-using-bash/

    Things you’ll want to focus on:

    1. Delimiters
    2. Syntax (Bash by default, but the syntax for whatever your chosen shell is)
    3. Switches
    4. Path (absolute and relative)
    5. Operators (Pipe will become one of your most heavily used)

    Then once you learn to do some basics, I would hammer repetition. Just force yourself to do things you would usually do via GUI by command line. I started with the basics of updating my system way back in the day with sudo apt-get update && upgrade

    Just type type type type all those commands until remembering them is muscle memory.

    • thingsiplay@beehaw.org
      link
      fedilink
      arrow-up
      0
      ·
      3 months ago

      Just type type type type all those commands until remembering them is muscle memory.

      For learning purposes, also try not to use aliases. Because using alias would undermine the learning process of knowing what and how its been done. I recommend (as you said) typing it out over and over again and use aliases on a later stage of your Linux learning only (maybe after weeks at least).

      • Snot Flickerman@lemmy.blahaj.zone
        link
        fedilink
        English
        arrow-up
        0
        ·
        3 months ago

        Exactly, shortcuts like aliases or tab completion really should be saved for after you’ve familiarized yourself, so you’re less likely to make a mistake or tab complete to the wrong command etc.

  • DickFiasco@lemm.ee
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    It sounds a bit nerdy, but dedicate some time just to learning a specific command once in a while. Start with something straightforward like ls. Read through the man pages and try out all the different options for it. After a while, you’ll master quite a few commands and will be able to string them together to perform more complex tasks. It’s definitely easier learning the system piece by piece like this. I used to learn by just jumping right in to a complex task, but I ended up with just a superficial understanding most of the time. Now days I try to be more deliberate about reading all the documentation and actually learning the tool/command/etc.

    Also, Arch has the archinstall script that greatly simplifies the install process if you need it. You’ll definitely learn more doing it manually though. I’ve been using Arch as my daily driver for a year now and I love it.

  • oscardejarjayes [comrade/them]@hexbear.net
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months ago

    Attempt an Arch install entirely from memory. You might want to try this in a VM, in case something goes wrong, but just do it. If you can’t quite remember what to do, man and ls /bin are your friends.

    • pineapple@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      edit-2
      3 months ago

      Sorry man I said I was a beginner I have never installed arch before that was more like an end goal I am not there yet I should have said i’m just running bazzite atm.

      • oscardejarjayes [comrade/them]@hexbear.net
        link
        fedilink
        English
        arrow-up
        0
        ·
        3 months ago

        Sure, maybe I was a little ambitious. But my point is mistakes can bring learning, so it might be worth it to try something “hard”. Trying things in a virtual machine is also often a good idea.