diff options
author | RayHammer <mail@rayhammer.dev> | 2023-10-12 09:07:48 +0200 |
---|---|---|
committer | RayHammer <mail@rayhammer.dev> | 2023-10-12 09:07:48 +0200 |
commit | 26c26495487704b6a9d82699ffe290cff498a429 (patch) | |
tree | 27ced76982f47b8094a0517568b0e8fc177a2baf | |
parent | 6397a3db79cc56a500508cde3a50954dcf57841f (diff) |
Added the Linux basics tutorial
-rw-r--r-- | content/tutorials/linux-basics.md | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/content/tutorials/linux-basics.md b/content/tutorials/linux-basics.md new file mode 100644 index 0000000..2d3376e --- /dev/null +++ b/content/tutorials/linux-basics.md @@ -0,0 +1,98 @@ +--- +title: "Linux Basics" +description: "AKA 'How do I do anything on this bloody thing?'" +date: 2023-10-12T07:45:24+02:00 +draft: false +--- + +So, you've finally managed to get your hands on a shiny new Linux distro, +whether it's on your VM or bare metal, if you were bold enough to do that. +First of all, I salute your bravery, but I assume you already knew +that you'd have to relearn a lot of things from scratch. +It's completely fine though, you probably took many years to learn +or maybe even master Windows or MacOS by now, so maybe it's time +for you to dedicate a little more time to get used to using Linux. + +<!-- more --> + +So let me give you a few tips on what your first steps might be: + +## Package manager + +A package manager is one of a few things that define the distribution. +Depending on what yours might be based on, you may have something like +`apt` (Debian, Ubuntu etc.), `dnf` (Fedora/Red Hat), `pacman` (Arch Linux) +or something else, if you picked a less common distro. +Either way, it is essential that you know exactly which one is +on your system. You might even have a GUI wrapper for your package +manager, which usually resembles your average app store +and might help you out if you're starting out, and it even might +include a system tray applet or another form of reminding you +whether your system is up-to-date or not. + +No matter which one you'll be using, consider your package manager +the most reliable source of apps and utilites you might want +on your system, so if you want to install something, check +if it's in the official package repositories first. +You can do it in your terminal by using one of the following commands +for the most common package managers: + +- `apt search [...]` +- `dnf search [...]` +- `pacman -Ss` + +Refer to your distro's documentation for further information +(and yes, [RTFM](https://en.wikipedia.org/wiki/RTFM) is very much what +you have to do to learn Linux, so you should get used to it). + +## Command line + +It may sound intimidating at first, but even in not-so-proficient +hands, invoking commands from your terminal might be one of the +fastest ways to get the job done, whatever it might be. +GUIs are nice and all, but the terminal is always here for you, +so I suggest you get used to it. Besides, whether you're trying +to debug an issue, install something or just use a ready solution +you copied from the interwebs, it will usually come for Linux users +in a form of terminal commands. + +One of the things you might want to keep in mind is whether +to run the command as a regular user or as root (superuser). +Some commands may explicitly start with `sudo`, which is +the default way of running commands as root on most systems, +and most of the time it is as easy as just appending that magic word +in front of your command. + +[![xkcd: Sandwich](https://imgs.xkcd.com/comics/sandwich.png +"It's uncanny how easy it is.")](https://xkcd.com/149/) + +On some rare occasions you may find the commands prefixed with either an `$` +or `#` symbols. These are NOT meant to be pasted in your command line, +and simply indicate whether you should run it as a regular user or +as a root (the former and latter ones respectively). To switch to a root user +in your terminal session, run `sudo -i` for an interactive root shell, +and use `Ctrl-D` to close it and go back to your regular user one. + +Now, I should remind you that running *anything* as a root user +means giving the command unrestricted privileges to your entire system, +so unless you know what you're doing, verify the command, carefully read +through it, see what it does and only then execute it. +Measure twice, run once, as they say. And RTFM, of course. +I told you this will be your MO for the nearest future. + +## Conclusion + +Now, I do not claim that this little tutorial will cover most of the use cases +you will encounter when starting out with Linux, but I also do not wish +to overwhelm anyone who's only trying it out. So it is only natural +that I finish this little tutorial with some general advice: +be ready to learn, don't be afraid to ask, and stay curious no matter what. +You might even break your entire OS and have no access to your backups +(which you should be doing regardless of your confidence and skill, FYI), +but it's only part of the learning process. +At least 99% percent of your issues will be because of your +screw-ups and not a product of some globo corpo's bad decision, +and in most cases they will be reversible as well. +Make mistakes and learn from them, what can I say. + +And once again, welcome to Linux. |