Ctrl+R to search your bash history. I hate how long I went without knowing this, so I've always got to spread the word about it.
Linux
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
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
Press the up arrow over and over until you find the command. This is they way!
77 times then 78 then 79 for the 3 commands you are looking for you ran consecutively 5 weeks ago
Huh.. Always just piped the history command through grep
- Linux is not Windows
Do not expect things to work as they do in Windows.
- The terminal is not to be feared (it only bites when told to)
While you can get most things done via a GUI option using the Terminal is much more powerful and gives more information.
- Not all hardware works with or works well with Linux
This pertains mostly to Laptops and peripherals, but always do a quick Google search to check for any issues.
One of the big issues for people is sound, a lot of computer & parts makers like to use the cheapest no-name parts they can because Windows lets them require "drivers" aka software fixes for poor hardware whereas Linux tends to give unaltered output leading to complaints about sound quality.
- Not all software works on or works well on Linux
You are not going to find software from Adobe, Microsoft office 365 etc running on Linux even using WINE.
Some games will not work on Linux even using the Proton compatibility software.
- Linux software is often lacking in the visuals but has lots of options under the hood.
There is a lot of software made for Linux are made by devs who focus more on the under the hood performance than making the software GUI look pretty. So don't be put off by the looks of a lot of Linux software.
- Alternative to is a great website.
I highly recommend Using the Alternativeto website to (as the name implies) find alternatives to software you use on Windows.
- Backup's are your friend
Setup an external device be it an internal hard drive, external hard drive or NAS as a backup target for your files.
You can use Timeshift to backup the entire drive (and it can reload a chosen backup directly onto the drive), Lucky backup to sync specified folders (either one way or both ways) to your drives or as I do use both.
And backup before doing major updates.
I have Timeshift setup to backup the entire drive (including $home) to a separate internal HDD and Luckybackup set to backup my important folders to an external USB HDD.
- Accidents will happen
As you are learning how to use and navigate you will have accidents that will require a full reinstall, don't fear this has happened to everyone else and why you backup your files so it's an annoyance instead of the end of the world.
- Hardware stuff
If you’re upgrading your laptop, find one with an intel wifi chip. Broadcom and Atheros may work, but be prepared for some headaches.
Intel and AMD video chips are also well supported. Avoid nvidia stuff.
My tip would be to try a few distros before you settle on one. Ubuntu was it for me about seven years ago, but I used mint for a few years and am using MX with xfce now.
Also, sudo !!
is pretty useful when you forget to sudo
the previous command. It means "super user do the last command I just boneheadedly forgot to do that to"
Also can use !!
and do a space at any place to bring in last command. Not used much as you could just do an up arrow but helps if you edit around a lot and experimenting with a cli tool or command.
Also, !!
is a shortcut for !-1
so if you want the 2nd latest command you could do !-2
and so on.
Honestly, one of the best things you could do is use Linux Mint instead of Ubuntu. It's a lot more new user friendly.
It's doesn't want to shove snaps down your throat, so I'd say it's more everyone friendly
I second this, mint is much user friendly than the current Ubuntu.
do not copy paste commands you do not uderstand from shady forums in hope it will solve your problem :)
Not very practical, but good for understanding the OS: Everything is a file. Even your filesystem and harddrive is represented by a file (devicenode).
Back in the day, before things such as pulseaudio and equivalents became the norm, there was also such a file (it might still exist, idk) for your soundcard. By shoving the contents of a wav file directly into /dev/dsp, you could hear it as if it was played normally.
Unrelates to the above, in a terminal context it's very handy to learn the concepts of STDIN, STDOUT, and STDERR, and how to manipulate these. I won't go into it here, but whenever you see a bunch of commands strung together with redirects, < > | >>, that's usually for sending the output (STDOUT) of one command somewhere else, such as to the input STDIN to another command.
Never use sudo for graphical apps. If you need admin permissions use pkexec instead.
ie. pkexec gparted
That's one I haven't heard before. Care to elaborate? And who works you use sudo on graphical apps in the first place?
Some GUI apps need admin permissions and will not work without them. Gparted is an example. pkexec (polkit exec) is the right way to start these apps, read this for more info https://askubuntu.com/questions/270006/why-should-users-never-use-normal-sudo-to-start-graphical-applications
I just started using Linux
Welcome!
I have not tried running WINE yet but I plan on doing so soon.
Don't feel pressured in any way to use Wine. Sure; if you're in need of certain software that's only available on Windows, then feel free to engage with Wine to get said software working on your system. However, note that a lot of alternatives exist, so make sure to check them out through something like alternativeto.net before getting involved with Wine.
What are some really important basic commands I can use to start branching out into Terminal command structures and learning more about how I can edit and customize my computer?
Broad question; arguably it makes sense to start out with something like linuxjourney.com if you haven't yet. After which, you might proceed to plunge deeper into some of the subjects that have been introduced through more expansive resources. Assuming that you might prefer something like a video guide of sorts; it's worth pointing out that the videos made by the Learn Linux TV channel on YouTube are excellent. One might argue that the ArcoLinux distro might be worth exploring as a platform to learn Linux on; it's literally one of its design goals. Though, once again, you shouldn't feel pressured in any way to use a certain distro to learn Linux on. We'll delve into distros later on.
And if Cinnamon has shortfalls or weaknesses that I may run into eventually, what are some good alternative distros that I could leapfrog to eventually?
Cinnamon is just a Desktop Environment, and it happens to look and function close to how Windows does, which is one of the main reasons it is often recommended to newer users that seek a familiar experience. There's nothing necessarily wrong with Cinnamon, really. Though, it's worth pointing out that it's not one of the top dogs in the realm of Desktop Environments; those would be GNOME and KDE. Those two have put in considerable work and effort to have proper Wayland support, which we'll call the 'successor' of X11; this is a very oversimplified description and thus somewhat false, but it would be out of scope for this comment to delve deeper into this. What's worth pointing out is that Cinnamon -due to its reliance on X11- is (very likely) to be deprived of features like HDR support and superior security standards as long as they don't put in the necessary time and effort to get proper Wayland support for themselves.
In case your question was meant to ask if Ubuntu LTS is the best platform/distro to learn Linux on, then the only correct answer would be that it depends on your needs. Ubuntu is definitely a decent choice, but you're not protected from unintentionally borking your system when you try to install Steam. Jokes aside, even though Pop!_OS is only based on Ubuntu and thus I don't know for 100% sure if said bug stems from Ubuntu or Pop!_OS, it's still worth pointing out that this is not necessarily a very bad showing for Ubuntu or Pop!_OS. Unfortunately bugs happen, though it's great to have a system that might be better protected..., though unfortunately nothing comes without a cost... compromises... compromises...; moving on.
In case you're interested to explore other distros, perhaps take a look at distrochooser.de. It's not exhaustive by any stretch of the imagination, but it's decent as a first orientation. If you share your result, then we might even give our opinion on the matter based on said results. If you do end up sharing the result, consider answering the following questions as well (feel free to give non-binary answers):
- Sane defaults or Blank slate?
- Full control or Little to no control?
- Secure or Convenient?
- Tool to get work done or Tool to explore/play around?
any great tips?
You might come across a piece of software that's not available within the repo of your distro. However, if you know that it's available in another distro's repo, then perhaps you should use Distrobox (or similar container-solutions) to access said software. Refer to videos on YouTube if you're interested to know how it works, though its documentation is quite excellent as well.
Try a few distros before settling down - setting things up a few times is a good way to get to know the ins and outs better. Try something other than plain Ubuntu - I really enjoyed Mint and PopOS personally, both of which are forks of Ubuntu. In my first 6 months I tried around 4-5 different Ubuntu family distros, and that was such an important learning experience for me.
If you want to use wine, get bottles instead of running plain wine. The dependencies are much easier to manage, and you can run separate configurations of wine. As I know from personal experience, the sandboxing also helps prevent you fucking your computer up.
On that note, backup your stuff - set it to do it automatically daily.
Look up some terminal games - there are a few that are designed to help you learn. I don't remember the names (I'm down to track them down later if that would help), but in particular I remember an SSH-based file searching game and a folder exploration dungeon crawler themed game.
Learning commands is less useful than understanding how Linux is setup, but it'll all come together with time - just keep playing around with it and learning new things.
On that note, backup your stuff - set it to do it automatically daily.
Mainly /home/
. As long as you have a backup of that, you can usually recover almost everything if something goes wrong by just installing all the same software. Configs, documents, downloads, saves, and so on are almost always stored in /home.
People will say "use this editor" or "use that window manager", but honestly it's just personal preference. There's no award for using ed to edit files, and almost anything you can do with one distro you can do with any other distro. You might get an urge to distrohop and compile the kernel, and that's fine, but imho far more useful is to learn how pipes work and what you can do with regular expressions. A tutorial for bash is always useful.
If you're typing out a long file path in the terminal you don't have to type the whole thing out, you can just press tab and it'll autocomplete for you.
So for example, if your file is called 1234567890.jpg you can just type 123 and hit tab and it'll fill in the rest. And if there's more than one file that begins with 123 it'll list them. Works for folder names too.
To add to this, you can press tab twice to get a list of available autocomplete options, which take into context the most recently typed text. This includes specific commands as well as folder/files.
Switch from bash to zsh and make it look nice – https://dev.to/abdfnx/oh-my-zsh-powerlevel10k-cool-terminal-1no0 Also replace ls with exa and cat with batcat. Remember you can set aliases in ~/.bashrc or ~/.zshrc.
If you like customization, I'd recommend KDE. If you like customizing keyboard stuff, you can customize your keyboard layout here: /usr/share/X11/xkb/symbols. Also look into espanso for text expansion.
If you have an Android phone, get KDE Connect.
If you need new software, check apt search if it's in there.
That's not very helpful advice for a beginner who just found a Distro and DE but the advice itself is good!
Rather than Ubuntu Cinnamon, you'd be better off with Linux Mint.
It's a little contradictory but make use of the amazing community and don't listen too much to the community. People are really helpful but you will hear stuff like "don't use that distro" or "don't use that desktop environment" a lot just because people in the community value those things and love to fight which is the best. You have to figure out what works best for you and not someone else! Still, the community is increadably helpful and there is someone to answer basically every question you have so never be afraid to ask stuff and welcome to the endless rabbithole! ;)
My advice is to search the Internet for some good resources on how to learn the Bash programming language, or else the "POSIX shell" (which is very slightly different from Bash). This is the command line language used by most Linux distros by default. POSIX shell is a complete programming language with built-in data structures, control flow like conditionals (if
statements) and loop syntax such as for
and while
, and function composition by way of shell pipes. Combine these with tools like find
and grep
and you can accomplish quite a lot with just a single line of code.
Also, I highly recommend you practice using Vi or Vim as a text editor until you get somewhat fluent. It isn't strictly required, but I recommend it simply because most people who use Linux as their daily driver also use these tools, and it helps a lot when communicating with other people in the Linux community, especially when it comes to solving problems. You want some fluency in using apps that the majority of people in your community are using. Also it is a good place to practice writing shell scripts.
Also not required, but learn a bit about Emacs as well. Learn how to use Dired (an Emacs app for working with ls
output interactively), learn how to open an edit a file from Dired, learn how to run find
and grep
from within Emacs. Learn how to run shell commands in Emacs and capture their log output. Also learn a bit about how to use Org-mode. (Shameless plug: I have my own series of blog posts on how to do these things.) This handful of basic skills will get you a very, very long way.
I can't comment much on customizing Cinnamon, but Cinnamon uses the Gtk toolkit, and so you can use any of the good Gtk themes out there to customize Cinnamon. Check out the UnixPorn community for more in-depth advice on that topic.
The Linux community is indeed remarkable, but the multitude of available distributions can sometimes give an impression of fragmentation. When you discover the distribution that best fits your needs, it's important to remember not to take it personally. Avoid developing a bias towards your chosen distribution as it could potentially lead to unnecessary conflicts with others who prefer different distributions within the community.
Always have a backup and don't be afraid to break it.
With the terminal, use the option --help
or view it's man pages with man (command you want to know more about)
to avoid having to search the Internet just to find out how commands work. You may find the terminology of certain things strange or may not understand how certain things are described at first, but you'll have a much better understanding of how everything works when you know how to look up what exacly something does. Oh and in man
use u and d to scroll up and down and /(searchword)
to search, that makes looking up stuff a lot faster, press q
or Ctrl-D to quit
My big tip is if you haven't already, switch to a local package repository. There are a lot of people mirroring the software packages for mint and you can switch to one that is geographically the closest to you for better speed and to spread out the server load.
I love Linux Mint and it's what I install on all my decom-laptops turned servers. It will do pretty much all you want to do in Windows and then some. The only thing it probably isn't the absolute best for is PC gaming but if you are just using a laptop it probably doesn't make much of a difference either way.
If you like Mint then I also suggest PopOS. They are both based on Ubuntu so a lot of the paths and the package manager are the same. The killer feature there is auto-tiling Windows which is like the window snap feature in windows but happens automatically. It's not for everyone but once I started using it, it changed my entire workflow.
Last thing is, if you haven't already, familiarize yourself with running docker containers. A lot of stuff that's complicated to set up is a breeze with docker and docker-compose.
I suggest to watch the package manager commands (probably 'apt --help') and use it for your packages. Package stuff is what I use the most in the terminal.
Don't chmod recursively on a whole lot of files if you don't know what you are doing. Also rm is a very powerful command, be wary. Lastly, piping to grep can be very helpful.
Edit-and-execute is very much worth learning about.
Don't try to install the best X and the best Y. Just start using what you can find, then gradually improve things as you notice becoming annoyed. Within a few years, you'll have a setup you enjoy.
First thing I'd do is ditch the GUI file manager: get comfortable with cd, ls, mv, rm, etc.
After that, maybe start with basic text manipulation, like grep, awk, sort, uniq, etc. This ties in nicely with IO redirection, which is essential for a "CLI based workflow." Get comfortable with pipes and file redirection, it's extremely powerful!
Writing shell scripts is another super useful exercise: any time you find yourself running the same set of commands multiple times, think about making it a shell script. You may end up with some really useful little custom tools that way.
Do NOT add too many third party repos, they're a pain in the ass to remove later.
Try distrobox.
unshare -nc followed by a command will run that program without network access. Very useful if you're running trash in Wine
Be patient. Anytime you have to delete any system files just rename it with bak suffix. Have fun
Remember to play. There are multiple terminal emulators, window managers, shells, all the things! Try 'em out. When installing stuff to test via distro package, keep note of which dependencies were dragged in so you can get rid if all of them, not just the thing you wanted to test. Also keep a list of what you tested and later got rid of (and why) so you avoid testing it again.
If you ever ssh into other machines to do stuff, learn the minimum of vi (classic w/no arrow keys, not vim) and bash. Servers "always" have those (though FreeBSD also has tcsh).
KDE is your friend in the trenches, Kubuntu > Ubuntu 100%
Regardless of whatever distro, definitely keep all your stuff backed up on an external drive. I had to "restart" my install a few times to get the hang of things. Yet I still keep all my info on an Vegacrypt encrypted external just in case to this day.
Snap is cringe, KDE neon > Kubuntu 200%.
Seriously though, I love kde neon so much. KDE being rolling release is a bit confusing at first, but you basically get the best of both worlds in terms of rolling and LTS releases.
Dotfiles. They let you customize your command line experience. There are loads of examples on GitHub. Reading through the comments on dotfiles that other people share help you learn about all the things that can be done. Customize your shell with aliases, functions, history behavior, syntax highlighting, etc.
I'm a Mac user who tinkers with Linux off and on, but I absolutely love that you're learning about the world of Linux. Welcome to the party!
https://github.com/topics/dotfiles
Shameless plug of some of my own custom tooling: https://github.com/fantismo/dotfiles
Probably already mentioned in other comments, buy it can't be stressed enough: Backups !
Part of learning to use Linux is breaking it. You will make mistakes that will bork your computer. You can either spend hours to try to fix it, or you can wipe everything clean, reinstall, restore from your latest backup, and be done like nothing happend in no time. (Maybe you want to go the hard way for learning, but it's always more relaxing to know you also have the easy option at your disposal)
Ubuntu comes with Timeshift, make use of it. Also plan to make backups to external storage or NAS, in case things go real bad.