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)
Not specific for learning, but you can put any command into ExplainShell and it breaks down the individual parts for you.
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, typingr
(lowercase "R") works like the "forward" button. Info also lets you search the index by pressingi
(lowercase "I") then entering your search in the prompt, or search the full text by pressings
and entering your search in the prompt. Andq
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 likecat
,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.
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.
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.
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.
IMO the best knowledge comes from doing practical examples that actually interest you. I wouldn't rush that.
The Linux Experiment fairly recently made a video about this: https://tilvids.com/w/w5SrXQUhk1a5iEtE9xPWgS
If you just want the links:
- https://linuxjourney.com/
- https://training.linuxfoundation.org/resources/?_sft_content_type=free-course
- https://linuxcommand.org/
- https://cmdchallenge.com/
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.
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.
I think you might like DIstroSea. If you'd like to persist your experiments, then likely learning how to emulate systems with QEMU or VirtualBox (the latter if you'd like a friendlier GUI-led experience, the former if you want to go full-CLI virtualization). QEMU is great in how lightweight and easy to create and discard self-contained VM disk images can be.
That looks interesting. I like the idea of trying to emulate a system only using the command line - I learn a lot from hands-on projects like this
That might be fun then.
QEMU can be as simple as this:
qemu-img create -f qcow2 mydisk.qcow2 20G
Here you are first creating a disk image with the format qcow2 and maximum 20G capacity. This is a QEMU disk image format that will take up very little space and grow as you use up the VM disk.
qemu-system-x86_64 -m 256M -cdrom alpine.iso mydisk.qcow2
This will start a VM with 256MB of RAM, the alpine.iso image in its virtual CD/DVD slot, and the disk image you just created as a virtual drive. This will come with networking enabled by default, so you'll have internet access from within the VM.
It should now drop you into the Alpine installation. Alpine is very lightweight so it's great for experimenting, but you could do virtually the exact same for most other flavors of Linux and BSD images out there.
Once you are done installing, you can power off the VM and then start it with this:
qemu-system-x86_64 -m 2G mydisk.qcow2
That's basically the same without the
-cdrom
argument, this time with 2GB of RAM. I find QEMU a delight to play with because it has sane defaults like that. Hope you have fun too!Thank you for such a detailed breakdown! I'll give all of this a go over the weekend.
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.
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.