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.

  • underisk [none/use name]@hexbear.net
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    For getting better at terminal I would suggest looking into alternative shells. Bash is fine, but it’s not exactly user friendly by default. Something with more robust auto completion like zsh or saner defaults like fish could make the learning experience easier. You can always come back to bash later.

    For understanding how the OS works I would start by reading about the file system layout, then look into the init process.

    I got to the point I am at through a series of projects of increasing complexity. First I ran a web server on my machine to copy files over the network. Then I used a spare PC to make a simple SMB server. Later I made it into a HTPC pirate box, for streaming stuff downloaded off Usenet to my Xbox. At some point I ran a minecraft server (before docker came along and trivialized this), and got into a bunch of sysadmin and programming stuff and that’s pretty much it.

    • N0x0n@lemmy.ml
      link
      fedilink
      arrow-up
      0
      ·
      10 months ago

      Just out of curiosity, do bash script work in zsh? Or are they totally different things and are not cross compatible?

      • underisk [none/use name]@hexbear.net
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        10 months ago

        Depends on what it is. If it’s meant to be mainly used in the shell I will usually use whatever language the shell uses. Anything that’s run automatically usually gets done in bash for compatibility, and stuff more complicated than a few loops and some piping gets done in something easier to work with like python.

  • electric_nan@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    10 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 :)

  • Frater Mus@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    What tips/ideas do you have for getting better at navigating the terminal, and getting a better understanding of how the os works

    Running an OS as a virtual is liberating. Dive in, make mistakes, fix them (or not and have to reinstall or redo from the last save). No real consequences for exploring.

  • secret300@lemmy.sdf.org
    link
    fedilink
    arrow-up
    1
    ·
    10 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

    • tmpod@lemmy.pt
      link
      fedilink
      English
      arrow-up
      1
      ·
      9 months ago

      Very useful, even for someone who has been using Linux for many years. Sometimes you just forget or need that tool you rarely use. tldr can be much handier than parsing a man page when you’re in a pinch.

      I use the tealdeer implementation, but any is fine really.

  • Palacegalleryratio [he/him]@hexbear.net
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 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.

  • blob42@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    9 months ago

    start from man man and learn to use man pages. Get used to lookup man pages for any topic before checking on the internet

  • kyub@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    10 months ago
    • To learn Arch, install it from scratch (without archinstall), it’ll force you to read the Wiki and learn a lot of necessary commands in the process. After the installation, just keep using it. Using a Linux distro full-time as the only installed OS is the best way to keep at it and truly learn it over time. There’s no magic bullet here. Just keep using it and solving problems or issues as you go, learning more and more stuff as you go. If you need other OSses as well, run those in a VM. I don’t recommend dual-boot setups.

    • Don’t blindly copy/paste commands you don’t understand. Always try to understand them first. Some commands can be very disruptive or even destroy your configuration. If you don’t understand it or are able to adapt it so that it fits to your particular configuration or system, you can EASILY damage a configuration, or even make your system unusable. Also, some people like trolling other people and deliberately share harmful commands. Generally, test potentially destructive commands or complex commandlines before actually running them.

    • Document major config changes that you do. This is useful because you’ll be able to undo certain changes or even replicate your current system configuration fast when you change distros or have to reinstall in the future. For example my current Arch-based setup is fully documented in form of an almost-directly executable shell script. It does require some interactions but very little. If I ever have to reinstall this system, or upgrade my hardware, it can be done insanely fast and it’ll have the exact same configuration. This goes from basic partitioning and encryption all the way up to dotfiles and individual program configurations.

    • Don’t feel the need to learn hard/advanced tools like Vim or Emacs unless you really think you’re getting an advantage from that and aren’t hesitant to put in the time and effort to learn them. Most people don’t need to use them. They’re amazing tools but you need to be prepared to lose quite a lot of time to learn them before you can become productive with them, and this might not be a tradeoff that’s useful for every single user. You can also get away with much simpler tools, like nano (as a console-based editor) or whatever programmer’s text editor you want.
    • Similarly, whether a pure WM or compositor plus assorted tools compared to a full desktop environment is worth it for you or not, is up to you. There’s no wrong or right answer here. I’ve tried out pretty much everything and these days use KDE Plasma because I like the consistency and integrations and dislike having different, inconsistent stand-alone tools for panels, menus, notifications, wallpaper, file manager and so on. But again, there’s no wrong or right answer here. Just what makes more sense for you. It’s worth learning how to be able to configure and use a minimalistic setup, for sure. So trying it out doesn’t hurt and increases your knowledge overall. In general, in the Linux world it’s good to always know enough to not be screwed once some component suddenly doesn’t work anymore. For example, a competent Linux user should be able to deal with (temporarily) not having a GUI and fixing his system via commandline.

    • A minimalistic, DIY distro like Arch can be amazing to learn everything, if you want to do that at least. If you just want a working desktop system with as little effort as possible, then don’t do that. But if you intend to learn every detail, then a distro like Arch is better suited for that goal than a “bloated”, fully pre-configured distro like Mint or Ubuntu is. Because Arch is much simpler on a technical level than those are. It’s much easier to understand e.g. the relatively simple package building process on Arch than it is on Debian/Ubuntu-based distros. But this “simple” explicitly refers to technical simplicity or minimalism. Most users expect something else when they hear “something is simple”. Arch is not simple as in beginner-friendly, but it is simple in terms of technical complexity, which is why many advanced users and tinkerers like it because it doesn’t stand in their way. It also means though that you HAVE to learn many things, e.g. how to configure a firewall, because it doesn’t come with any preinstalled by default. With Arch, the admin is supposed to know about everything and configure every component himself, at least on a somewhat basic level.

    • If you want to go to even more details, you could also try out a source-based distro like Gentoo or Crux, which can also be a great learning experience, but it’s even more details regarding compilations of each package, dependencies, compile-time options, etc. you have to deal with than with a minimalistic binary-package-based distro like Arch, so whether that’s useful for you or not is up to you of course.
    • While we’re at it: LFS (Linux from Scratch) is not a distro per se, it’s a guide on how to build your own distribution from scratch. It’s VERY time intensive and not recommended unless you truly want to learn how to build a complete distribution from scratch, or maybe start your own distro some day which isn’t based on another existing distro.
    • Jode@midwest.social
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 months ago

      documented in form of an almost-directly executable shell script

      I’m annoyed with myself for not thinking of doing this

  • phantomwise@lemmy.ml
    link
    fedilink
    English
    arrow-up
    0
    ·
    10 months ago

    Using tldr to learn commands. It gives you the information you are probably looking for in the man page but it’s not buried among lines and lines and lines of arcane stuff and it’s formatted in a readable way with helpful examples. Saved my sanity more than once.

    I’m not saying “don’t read the man pages”, they are great way to get a deeper understanding of commands. But when you are just wondering what a command does and how it’s commonly used, then a two lines summary + example is much more helpful than an essay going in minute details over everything.

    Since it takes a lot less time than hunting the same info in the man page, you can run it before every command you are not familiar with, without too much hassle. Then if you want more info you can check the man page.