this post was submitted on 29 Dec 2024
155 points (98.1% liked)

Linux

49007 readers
1233 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

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.

(page 2) 50 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 2 weeks ago (2 children)

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.

load more comments (2 replies)
[–] [email protected] 1 points 2 weeks ago

"I take full responsibility for my Arch system."

[–] [email protected] 4 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

I can tell you how I learned linux. be prepared to cringe.

  1. I installed Linux before going to school, I figured that if I used Linux as my main OS I would be less tempted to dick around and play games

  2. I eventually found a coop part time job as a dev. I used my own Linux machine, and being the star eyed young person I was I used arch.

this is the cringe part:

  1. I did dev work on arch Linux without fully understanding how it works and ran into multiple issues (none of which was because of arch). for instance my USB wifi driver was the dogshit broadcom ones so the "drivers" for it were kind of messed and I had to hack several things into get it to work.

I learned systemd, Linux kernel modules, dkpg, obviously more familiarity with bash and shell stuff

  1. I ran into issues with grub because FUCK grub. so I had to learn about boot loaders, fixing your install with chroot on a live usb, I also wrote step by step guides to untuck my particular problem just in case I run into it again

so moral of the story is.. dive in?

load more comments (1 replies)
[–] [email protected] 18 points 2 weeks ago (1 children)

Haven't seen anyone mention https://overthewire.org/wargames/bandit/ yet. It's a Linux shell game where you need to solve problems using shell commands that only requires an ssh client on your machine: you ssh into the first server, solve a problem, and the solution points you to the next server. It starts easy (e.g. read out this file using cat) but gets hard quickly. But you can always look up solutions when you're stuck. It gives a good idea what certain commands are used for and how they can be combined in powerful ways.

load more comments (1 replies)
[–] [email protected] 4 points 2 weeks ago

I'm going to go against the grain a bit and suggest studying for a certificate. Find one that looks interesting, and just prepare for it. You don't necessarily have to get the certificate, but training for it will give you a good foundation for running your systems.

https://hackr.io/blog/best-linux-certifications

[–] [email protected] 13 points 2 weeks ago

Linux is like kung-fu, mastery comes through practice
Learn the ways of Linux-fu

[–] [email protected] 20 points 2 weeks ago (2 children)

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.

[–] [email protected] 1 points 2 weeks ago (1 children)

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.

[–] [email protected] 1 points 2 weeks ago

Gentoo's still around and quite modern. And USE flags are addictive.

[–] [email protected] 8 points 2 weeks ago (1 children)

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.

[–] [email protected] 4 points 2 weeks ago* (last edited 2 weeks 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.

[–] [email protected] 9 points 2 weeks ago

Just use it and fix things when they break. There's no magic bullet - just experience.

[–] [email protected] 1 points 2 weeks ago

Here is a bunch of random tips to become more comfortable with the terminal.

Do absolutely everything that you can on the terminal.

When you install something, enable the verbose if possible and snoop around the logs to see what is happening.

If an app or an install fails, look at the logs to see what is the issue, and try to fix it by actually resolving the error itself first instead of finding the commands on the internet to fix your issue.

Instead of googling for your command options, use the help menu from the application and try to figure out how to use the command from there.

[–] [email protected] 2 points 2 weeks ago (1 children)

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.

Why? I have been using Linux for nearly two decades and I am perfectly content with a low-config distro and desktop environment. You don’t have to use Arch but if you insist get a Steam Deck.

[–] [email protected] 3 points 2 weeks ago (1 children)

I just want to get a better understanding on linux and I think arch is the way to do it. I love computers and I want to know them well.

load more comments (1 replies)
[–] [email protected] 4 points 2 weeks 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 :)

[–] [email protected] 1 points 2 weeks ago* (last edited 2 weeks ago)

on the tailend of a convo in in a discord recently I added a command to the "customize chatgpt" section to allow chatgpt to have a custom "man" like command similar to linux, but that works for all code or commands.

This makes chatgpt give me a Linux command or code snippet formated in a table explaining what each piece of the command does.

when a prompt is givin beginning with the word man followed by code or commands please respond with a table following these rules and nothing else: skip title row, No backticks around command components, No unnecessary rows, column 1 should contain the command component, column 2 should contain a brief command description

[–] [email protected] 2 points 2 weeks 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.

[–] [email protected] 3 points 2 weeks ago* (last edited 1 week ago)

erasure edit: ok nvm, thanks

[–] [email protected] 1 points 2 weeks 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.

[–] [email protected] 3 points 2 weeks ago (1 children)

I will be using your example of Arch as a great stepping off point, because honestly imo the best way to learn is by having a project to work on

  1. RTFM - Read The Fucking Manual. Read the docs, read the code comments if need be. In the case of installing an OS, use the installation guide as a starting point; Arch's is on their wiki, and links to several other sections that go more in-depth about what each step does and why it does it.

  2. DuckDuck it - if you don't understand what something is or why you're doing it, search it. If you understand it completely, search it anyway and check the docs because no you don't, you just don't know how little you know. If you know why we do something and what function it fulfills, but not how... Then you're a power user.

Using your example of commands from the internet, break the command down into as many parts as you can, and figure out what each part does. If there's punctuation marks, don't assume you know what those are doing. man [command's name] is your friend.

  1. Do all of the above as often as possible, no matter how slow it makes progress feel. Learning these things the proper way now will save you from days, weeks and months of troubleshooting in the future. I mean it, literally at every step of the process.

  2. secondary sources are invaluable, but for this it might help to get into the best way to self-educate. The only gospel are the docs and/or manual that were written by the code/OS maintainers - primary sources - everything else is opinion.

Here's a source i agree with on the best way to self-educate, but keep in mind even Artem is still just a secondary source.

That being said, here's a few secondary sources that helped me understand how OSes work and why:

nand2tetris: build an operating system starting with logic gates and working your way up from there. It has a offshoot site that's slowly being rolled out, that implements it all in a gamified interface: nandgame

os-tutorial: build an OS from scratch

Linux From Scratch: Learn everything about Linux by building your own distro from the kernel up.

Unfortunately everything that taught about the behind-the-scenes aspects of OSes in general—and Linux in specific—were either projects like the above, or just seeing what came up in a DuckDuckGo, Youtube, forum, or wiki etc. search. Below are just resources that teach you about the "power user" level of knowledge, not "super user" but not your average user either.

Fireships' 100+ Linux Things you Need to Know: it's not particularly good on its own, but it does introduce a lot of concepts and vocab for you to then look up elsewhere

freeCodeCamp.org offers a lot of courses that will go over using Linux. None go too in-depth on the fundamentals of Operating Systems, but they will still introduce most of what you need to know for day-to-day use. I don't want to link them all, but just search for linux freecodecamp on youtube and find one that piques your interest. The longer, the more in-depth—you don't have to watch it all in one sitting.

  1. And of course, when all else fails: just ask. Participate in the community, don't be afraid of looking stupid. The only people that get no respect are the ones who refuse to accept others' help because they know better than those they're asking to help them. (ignore the gatekeepers who want to project their own need for an identity onto you)
[–] [email protected] 1 points 2 weeks ago (1 children)

duck duck it

I use searx. Ok but seriously very helpful I will look into that.

load more comments (1 replies)
[–] [email protected] 2 points 2 weeks ago

When you are doing stuff in the terminal write it down somewhere else also, on a piece of real life paper or in a simple text document or whatever works for you.

In general I found taking notes while trying to do things in the terminal helped me learn.

[–] [email protected] 8 points 2 weeks ago (2 children)

More than anything, what leveled up my Linux knowledge was switching to Gentoo back while I was in college.

Before that, I used SuSE, and I switched specifically because I felt like I wasn't learning anything really about Linux just by using point-and-click tools like YAST.

I've used Arch for the last... 7-ish years? (Though now I'm basically in the process of switching back to Gentoo. In terms of learning Linux, Arch is... close to as good as Gentoo for that purpose. Not quite as good, but pretty close.)

As for the best approach for learning, though, you know how they say the best way to learn a language is "immersion"? As in, to move to where they speak the language. In the same way, if what you're going for is to learn, just take a dive. Install Arch over top of your current OS and don't look back. Just commit to it.

Also, use the most minimal stuff you can. Skip KDE and use dwm. Skip the login manager and start your GUI from the command line. Don't install a file manager and instead use Bash directly. (It's more than capable.) Don't install anything you can do instead with a Bash one-liner or a small Bash script. If after you've gotten pretty used to minimal stuff you still want something that the heavier alternatives offer, you can of course switch, but if your aim is to learn, avoid using the kind of stuff that tries to be "user friendly" by hiding all the internal implementation details from you. (Instead use the stuff that is user friendly by virtue of having so few moving parts that understanding how it works under-the-hood is trivial.)

And, don't settle for "it's fucked beyond repair." If it's fucked, google your ass off. If that doesn't work, ask on the official Arch forums or here or wherever. (Don't worry, they don't bite.)

[–] [email protected] 2 points 2 weeks ago (2 children)

Is bash ultimately better than dolphin or another file manager? I always thought that it just seamed slow having to read things out with no icons and having to type the filename instead of double clicking. And I have been avoiding installing applications through terminal because I can't find how to properly uninstall them including all data (the fedora software center does this really easily) I have also had some trouble going further back that my user folder in the terminal I still havn't figured out how to do that. Lastly what are some "user friendly by virtiue of having few moving parts" distro's that you recommend?

[–] [email protected] 1 points 2 weeks ago (1 children)

Is bash ultimately better than dolphin or another file manager?

  1. Yes. (Disclaimer, some statements contain opinion.)

  2. OP was specifically asking how to learn more about Linux. And it's nearly unquestionable that OP is going to learn more about how Linux works if they use the lower-level tools rather than take-you-by-the-hand point-and-click-adventure programs your grandmother could probably figure out.

I always thought that it just seamed slow having to read things out with no icons and having to type the filename instead of double clicking.

So, again, this is just me spouting my own preferences here, but I don't often touch the mouse. Moving my hand from keyboard to mouse takes time. I can use a keyboard shortcut to open a terminal, cd into the proper directory (using tab complete and set -o vi to make things quicker still), and start dealing with files much quicker than I could navigate a menu to get to, say, Dolphin, wait for it to load (if you use a minimal terminal, it should load basically instantaneously), and then start navigating.

And I have been avoiding installing applications through terminal because I can't find how to properly uninstall them including all data (the fedora software center does this really easily)

Not sure I can help you there. I've never used Fedora. I used CentOS once for a short time, but it was a long time ago and I basically don't remember it at all.

I have also had some trouble going further back that my user folder in the terminal I still havn't figured out how to do that.

Like, to the parent directory of your home directory? cd .. should always go to the parent directory of your current working directory. (/ is its own parent, I believe, so you can't go any further up the chain than that.)

Lastly what are some "user friendly by virtiue of having few moving parts" distro's that you recommend?

Gentoo and Arch. I've never used Void, but it sounds to me like Void is very minimal (has few moving parts) while also being much less of a learning curve than Gentoo and Arch.

When I say "few moving parts", I mean, roughly speaking, fewer lines of source code. KDE (just for instance) is a huge beast. It tries to accomplish user friendliness by adding layers upon layers of abstraction, in the process obscuring what's really going on at lower levels from the user. It... doesn't really work. What it gains you in reduced learning curve becomes an obstacle the moment something goes wrong or you want to peek under the hood. Ubuntu (just as another example) installs tons of stuff to try to shield you from the nitty gritty details. But again, that causes more problems than it solves unless you're dead set against ever looking under the hood for any reason.

The term "user friendly" tends to mean "my grandmother can use it without having to learn anything in the process." In the comment about "user friendly by virtiue of having few moving parts", I didn't mean "user friendly" in the same sense. I don't think "user friendly" in the more common sense id mutually exclusive with "fewer moving parts." At least not in theory. But in practice, that does seem to be the trend.

[–] [email protected] 1 points 2 weeks ago (5 children)

OP was specifically asking how to learn more about Linux. And it’s nearly unquestionable that OP is going to learn more about how Linux works if they use the lower-level tools rather than take-you-by-the-hand point-and-click-adventure programs your grandmother could probably figure out.

Yes I am op.

and thanks for the reply. So I guess I should just skip anything with a desktop environment like manjaro and just figure out how to install bare arch?

Like, to the parent directory of your home directory? cd .. should always go to the parent directory of your current working directory. (/ is its own parent, I believe, so you can’t go any further up the chain than that.)

Yes cd .. was what I was looking for thanks!

load more comments (5 replies)
[–] [email protected] 1 points 2 weeks ago (1 children)

having to type the filename instead of double clicking.

Google "tab completion"

[–] [email protected] 1 points 2 weeks ago
[–] [email protected] 3 points 2 weeks ago (1 children)

thanks for the required motivation! i started to settle, i will try arch today after i am done with my exams.

CC: @[email protected]

[–] [email protected] 1 points 2 weeks ago

Good luck! I'm honestly a little jealous of you getting to start this journey for the first time!

[–] [email protected] 1 points 2 weeks ago
[–] [email protected] 2 points 2 weeks ago (1 children)

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.

[–] [email protected] 2 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

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.

[–] [email protected] 2 points 2 weeks 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.

[–] [email protected] 2 points 2 weeks ago
[–] [email protected] 6 points 2 weeks 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

[–] [email protected] 3 points 2 weeks ago

And how did you, advanced Linux user, get to the stage your at now?

Incrementally over time by reading the documentation and/or manuals of the commands I need to run and looking up how others solve the problems that I need to get other ideas about things (even, periodically, for things that I already know how to do to see if anyone has found a better way to do it or if a new tool has come out that helps). And trying things out/experimenting with different ways of doing things to find out what works well or not.

[–] [email protected] 5 points 2 weeks ago

Explainshell.com is pretty useful for understanding shell commands you might find on forums.

load more comments
view more: ‹ prev next ›