4-6 Minute Read
Starting out with Linux®
Let me teach you the basics of a Linux system. You will learn how to make files quickly, how to manage users, how to use permissions and sudo, how to download packages easily, and more!
Making files and folders
Users coming from windows-like systems may be wondering what happened to the “New File” button in the GNOME file manager. Instead of making you press a button and scavenge throughout a list of possible file types, the standard way to make a file in GNOME is to right-click while you are inside to folder you want to make the file in, and select “Open in Console” from the menu that shows up.
You will be greeted with a terminal that prompts you to enter a command. To make a file, we can simply type touch “file name with extension“ and click enter on our keyboard. This will create the file you specified in the command in the folder you are in. To make a directory, do all of these steps again, except you need to substitute the first occurrence of “touch” in the command with “mkdir“.
Just like any modern operating system, GNU/Linux includes a user management system. Today, we will be exploring this functionality from the command line, but you can find full documentation on doing this graphically with GNOME Here.
To add a user, simply execute the following command:
sudo useradd -m placeholder
To give this user a password:
sudo passwd placeholder
To remove this user:
sudo userdel -r placeholder
To give this user sudo privileges (If you don’t know what this is, keep reading):
sudo usermod -aG root placeholder
To revoke this users sudo privileges (If you don’t know what this is, keep reading):
gpasswd –delete placeholder root
Root privileges and Sudo
GNU/Linux calls having every administrative privilege “root”. As this user has every privilege you could have in a Linux based system. There is a problem, though, not every user can be named the same, hence there is only one user with these permissions. To get around this, simply type “sudo” (with a space after it) in front of any command that requires these privileges (Some commands will fail without it) and the system will prompt you for your password.
If you entered your password correctly, then the command should run perfectly fine.
All about Packages
A “Package” is just a fancy way of saying “App”, or “Software”. On Windows, there is no package manager, and users have to scavenge different websites to find a download link to an installer or executable file. macOS does not come with one, however since it is Unix-like, like Linux, these programs can be downloaded from the web and installed, with the most popular macOS package manager being HomeBrew (It is available for Linux, however it is rarely used this way). SDesk comes with the Arch package manager, Pacman.
To install a package, execute the following command:
sudo pacman -S examplepackageplaceholder
To remove a package:
sudo pacman -R examplepackageplaceholder
To update SDesk:
sudo pacman -Syu
To force SDesk to update no matter what (Except for a nonexistent internet connection):
sudo pacman -Syyu
To update and downgrade SDesk packages:
sudo pacman -Syuu
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
Written by: Stephen Byrne