You’ve decided to start using Linux, but are you doing it right? If you want to be successful with this operating system, and save yourself hours of frustration, then you need to know about these 10 tips. They’ll help you become an expert user in no time!
Linux Tips 1 - Use the command line
Don't be scared of it. Instead, embrace it. The command line allows you to type in powerful commands and quickly execute them with one command keystroke. It's a great way to add files and folders quickly as well as make backup copies of your data when working with text editors like vim or gedit. Plus, getting better at typing commands improves your typing speed and accuracy, which is important no matter what you're doing on a computer! There are hundreds of incredible Linux utilities that help you do everything from viewing files to removing duplicate lines from a file (so useful!). Find out more about these exciting tools by perusing our huge list of open source software for beginners.
Linux tips 2 - Edit text files with vi
vi is a powerful command-line text editor. It’s not always easy to understand and use vi, but there are some essential features that every beginner needs to know. The first thing to remember about vi is that commands don’t need an ending semi-colon. This can make it hard to tell where one command ends and another begins, so do take time to learn your way around the keys. There are a few other important shortcuts that are worth committing to memory; these will help when you’re trying to find your way around large documents, particularly in terms of search features and saving drafts of work. The main ones to note down are: i - Insert mode (You get out of insert mode by pressing Esc.) o - Open a new line below current one [x]x - Repeat last action nG - Go down n lines (pressing G again resets) p$ - Go to end of a current sentence (to move back, press Esc followed by u). wq - Write file & exit vi:wq will write your file and quit altogether: wr will overwrite an existing file rather than adding to it.
Linux tips 3 - Get familiar with Sudo
Learn how to execute commands as root by prepending sudo in front of each command. For example, if you wanted to restart your server with sudo, you would type sudo reboot. Be sure to practice using sudo before using it on your live system. You'll be surprised at just how easy it is to make a mistake with something as simple as an incorrect directory name or command name! That's why I recommend getting familiar with adding sudo in front of all your daily tasks until it becomes second nature. Don't be shy about running commands as root; being able to do so will make every part of administering your system easier and faster. The first step is admitting that you're not above making mistakes when using technical tools...and then learning from them immediately.
Linux tips 4 - Become root with su
The Superuser or root is a special user in Linux. It has full control over every single file and resources on your machine. If you're not logged in as root, it's best to stay out of its way. Fortunately, you can switch to root with an easy-to-remember command: su. The single hyphen at the beginning of su tells it that we want to run a program as another user (root).
Linux tips 5 - Learn to use shortcuts
One of the biggest advantages of using a terminal-based interface like that in Linux is that it enables you to use your computer with just a keyboard. You can do nearly everything by pressing shortcut keys or typing in one or two lines of code. There are so many shortcuts, it's impossible to list them all here, but here are some that every beginner should know: Ctrl+Shift+X (Cut), Ctrl+Shift+C (Copy), Ctrl+Shift+V (Paste), and Ctrl+Shift+Z (Undo). As these commands are universally used across most operating systems, they're invaluable when working in any environment and they'll come up over and over again while learning how to become a Linux pro.
Linux Tips 6 - Use the terminal for navigation
Most beginners to Linux spend their first few days stumbling around with a mouse and keyboard, clicking on window borders to manage them. It’s common to think that you have to go through those extra steps with a GUI. One handy trick is using your terminal for navigation— just use cd (change directory) to make your way around. For example, if you want to get from your home directory into a subdirectory called work, simply type cd work. If that directory isn’t already open in its tab or window, it will open automatically when you hit Enter. No need to click. Another nifty shortcut lets you switch between two directories very quickly—say, home and work. Let’s say we already have our Terminal open in /home/ubuntu. Just typing cd w and tab gets us into /work/. And once again, when we are there, either a new tab or window opens automatically. We can also combine these tricks; let's say we want to jump back out of /work/website and then move into ~/fun instead: just type cd ../fun! Note how easy it was to navigate between locations without ever touching the mouse!
Linux tips 7 - Learn about package managers
When you’re just starting with a new operating system, there are a lot of commands to remember and skills to learn. This can make it seem like you’ll be drowning in a sea of new things. Instead, try learning how to use package managers instead—tools that allow you to install software from within your operating system using one-click installers. There are many package managers available for Linux, but one of my favorites is apt-get. The tool allows you to type apt-get followed by any application name or series of keywords representing what kind of app you want. Apt-get then goes through its listings and installs everything required for that app or program to run on your computer. If you’re new to Linux, using a package manager is useful. The fastest way to learn any skill? Practice... tons & tons & tons of practice!
Linux tips 8 - Update your system and software
To keep your software up-to-date, you will need to update your system regularly. The command for updating is sudo apt-get update && sudo apt-get upgrade. This will ensure that all of your installed packages are up to date, and any new versions will be downloaded automatically. You should also run a few configuration commands. Use sudo dpkg --configure -a if you have made changes with a configuration tool or added packages manually without using synaptic.
Linux tips 9 - Install software from source code
With so many applications available for free over Linux, you may find yourself feeling overwhelmed. While installing a program from source code can be a little more time-consuming than using a package manager, it's also potentially more rewarding. By building your application from source code, you'll learn some interesting things about its inner workings and gain a deeper understanding of how the software works in general. If nothing else, it'll give you some concrete examples of how to install packages on your own. Plus, if you discover any bugs in the process and report them to those who wrote the software originally—it can provide invaluable experience for those looking to become programmers or system administrators later on down their career path.
Linux tips 10 - Understand file permissions
File permissions are one of those things that most new Linux users have a lot of trouble getting a handle on. In some ways, it's similar to other operating systems in that you have read and write permissions for folders, but there are also special modes for executable files and different types of system files. As such, there can be a bit of trial-and-error involved when it comes to figuring out how they all work together. The best way to learn file permissions is by seeing them in action — if you're on Ubuntu or another distribution that already has desktop access enabled, set up some test files so you can see how they get treated.