this post was submitted on 02 May 2024
98 points (97.1% liked)

Linux

48029 readers
789 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've been using Linux for about 7 months now and have become a lot more comfortable using the terminal but I feel like there is more that I can learn.

Most of my work is done in a browser or DaVinci Resolve. I do try to use the terminal where possible but it's limited due to my workflow.

Are there any interactive sites where I can practice/learn the terminal? I'm going through Linux Survival at the moment.

EDIT: I forgot to add some important details.

I don't have a massive need for the terminal for my current workflow but I think it is important to know (looks good for any future job applications as well) and expand your knowledge on things that interest you when possible.

In the future, I hope to have a home lab/NAS running Linux. I will most likely SSH into that and I'd like to deal with any issues via the terminal.

I use Arch btw (technically EndeavourOS)

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

What, things like sudo rm -f /

[–] [email protected] 0 points 6 months ago

that wouldn't do anything except give you an error that / is a directory

[–] [email protected] 8 points 6 months ago

As many people have already said, just do what you need to do. That's the best way to learn. But if you are afraid you'll break your system with dangerous commands, use docker or a virtual machine for practice.

[–] [email protected] 12 points 6 months ago (1 children)

The Linux Experiment fairly recently made a video about this: https://tilvids.com/w/w5SrXQUhk1a5iEtE9xPWgS

If you just want the links:

I also recommend learnlinux.tv and especially the YouTube channel

Since you're on Arch, the Arch Wiki is a great resource if you ever need to look something up. If you just want to improve your CLI skills and make the life in the Terminal more pleasant, I'd recommend the fish shell. (Check this out if you want a video demonstration) It has a great autocomplete feature and shows you a short description of each command, which might help you to learn more about it. It's also very flexible and customizable. (Check out this video for some neat tricks) My last recommendation is tldr, it's a very useful application that gives you a short summary of how to use a command. These summaries are much easier to read and understand than manpages. I assume you know about manpages, if not, that's another recommendation.

[–] [email protected] 2 points 6 months ago

Here is an alternative Piped link(s):

the YouTube channel

this

this video

Piped is a privacy-respecting open-source alternative frontend to YouTube.

I'm open-source; check me out at GitHub.

[–] [email protected] 0 points 6 months ago

Eh, just try new commands in your distro and see what happens -- "time is the best teacher of em all".

[–] [email protected] 8 points 6 months ago (1 children)

IMO the best knowledge comes from doing practical examples that actually interest you. I wouldn't rush that.

[–] [email protected] 6 points 6 months ago (1 children)

This is the crux of my whole life. If I am not interested in something, my entire existence will basically refuse to soak up that knowledge or even try to empathize. It can sometimes suck. I have to walk away if people start engaging in conversations about sports.

It got easier to start digging into CLI after realizing that would be an easy way to get the home media server up and running. And managing local game servers.

It's a little harder to focus on vlans and firewall rules, outside of the repercussions of not setting that up correctly.

[–] [email protected] 2 points 6 months ago

Yeah, it's also very difficult for me to focus on something if I don't know where I'm going.

[–] [email protected] 23 points 6 months ago (1 children)

Not specific for learning, but you can put any command into ExplainShell and it breaks down the individual parts for you.

[–] [email protected] 6 points 6 months ago

That's super useful, thanks!

[–] [email protected] 6 points 6 months ago

Try to avoid using any file manager (uninstall them all if it is difficult to avoid running them). So you will practice in using file manipulation commands.

[–] [email protected] 4 points 6 months ago

Use a virtual machine inside virtual box, or docker, or some other container. Back when I started the os could literally break to CLI and I've have to learn to fix it with Google and another computer or my phone 😅. Instead of blindly pasting commands, read the man pages. After years I have a handful of useful commands I use and I really do find it easier to do certain things from cli vs GUI. It will come with time, don't worry.

[–] [email protected] 4 points 6 months ago
[–] [email protected] 31 points 6 months ago (1 children)

This website has a bunch of great practice "wargames". You'll learn a bunch about common linux commands and the different options for them. It also provides you with some great tips on what to google if you get stuck. I reccomend starting with bandit.

https://overthewire.org/

[–] [email protected] 5 points 6 months ago

I recommend this to everyone I meet in tech, it's really good to learn linux and file system skills

[–] [email protected] 10 points 6 months ago* (last edited 6 months ago) (1 children)

As many here have said, but I will emphasize: learn the Bash programming language. Linux Survival is a very good start, and you can just start experimenting right away in your own terminal on your own computer.

To go more in depth, you can read through the manual on your computer by typing "info bash". The Info documentation browser is a command line app. You may need to install it using your package manager ("apt-get" or "pacman" or "dnf").

In the "info" app, you can navigate with the arrow keys, pressing enter on hyperlinks, typing l (lowercase "L") works like the "back" button in a web browser, typing r (lowercase "R") works like the "forward" button. Info also lets you search the index by pressing i (lowercase "I") then entering your search in the prompt, or search the full text by pressing s and entering your search in the prompt. And q quits back to the command line prompt. "Ctrl-Z" pauses the "Info" app and drops you back into the command line, and you can resume your "info" session using the "%" (percent sign) command.

Another thing that can help is to learn about the GNU "Coreutils", this is a suite of commands usually installed into /usr/bin or /bin which provides helpful command line utilities. These are commands like cat, wc, sort, cut, ls, du, cp, ln, chmod and many others. Read through the Coreutils Info manual by typing "info coreutils".

And I will also reiterate recommendations from others: learn how to use Vim and/or Emacs. Vim has the more difficult learning curve but is extremely useful for writing scripts. Emacs is better though because it lets you split-screen with manual pages, and copy-paste commands between Man pages, "Infodoc" documents, the shell, and/or a text file, all using only keyboard commands. I think it makes it much easier to learn since everything is integrated together. Ask the Emacs community how to get started if you are interested.

[–] [email protected] 3 points 6 months ago

Thank you for such a detailed response.

I've tried learning Vim previously but I never really gave it as much time as I should have. I haven't tried Emacs yet, I'll have a look at that as well.

[–] [email protected] 2 points 6 months ago

I recommend installing a Linux distribution that requires a hands-in approach like Gentoo or Linux from scratch. If you don't have an extra computer you can do it on a virtual machine on the computer you do have.

The process will require you to use the various incantations and rituals of using the terminal. As you do so, learn what they do by googling them or using their man page.

For more practice, write a shell script or otherwise choose a task you want to do using the terminal like browsing through your files or searching for a file whose name matches a pattern and so on.

[–] [email protected] 6 points 6 months ago

I believe it isn't the terminal. You are looking for the shell. On arch, it is bash.

man bash

And then, because man pages are too hard for beginners, google for some bash tutorials.

In addition, you want to learn vi. One of the greatest tools of all times after 1969 :-)

[–] [email protected] 7 points 6 months ago (1 children)
[–] [email protected] 1 points 6 months ago (1 children)

Good lord. How on earth do they prevent people from abusing this to no end?

[–] [email protected] 1 points 5 months ago

Honeypot? Dunno. Good discussions about it on hacker news.

[–] [email protected] 9 points 6 months ago (2 children)

Cost: $10

One year of a small vps. Fiddle around with it, get it secure, run some services on it, flatten and reinstall through the web kvm when you fuck up.

Look at your logs and be terrified at how many computers are just out there poking and prodding at random ips on the internet.

Say “I’m in” and push play on squarepusher when you log in.

[–] [email protected] 1 points 6 months ago

+1 for just mentioning squarepusher

[–] [email protected] 4 points 6 months ago* (last edited 6 months ago) (1 children)

Pardon me for asking, but this looks very strange. 10$ a year, when most VPS hosts I see are 5$ish a month, and the website is default WordPress stuff with literally nothing in their knowledge base, and two blog posts. Also your link is to https://cloudserver.net Where as when I lookup the name, https://www.cloudserver.net/. A totally different looking website. What is this?

[–] [email protected] 6 points 6 months ago (1 children)

It’s the link from lowendbox.com’s list of cheap vpses. I’ve used a few of em including cloudserver and they’re fine. Cloudserver actually did the most kyc stuff out of any on that list.

Idk why the link is different or any of the stuff you’re talking about. It’s old, November of last year, but it still seems to work.

[–] [email protected] 3 points 6 months ago

Oh that's a cool resource, thanks for the share.

[–] [email protected] 15 points 6 months ago* (last edited 6 months ago)

In m opinion, practicing with real life problems is the best teacher. There are some ways to cut and convert videos, audio and images via terminal. Maybe there is still a way to enrich or streamline your workflow with that. Maybe a script which will prepare the folder of your next project. Also, xdotools let you automate a lot of sometimes tedious routines.

load more comments
view more: next ›