

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 3
click for more info
Not enough gems
Cost: 6 gems
1: Users
incomplete
2: Whoami and sudo
incomplete
3: Permissions
incomplete
4: Changing Permissions
incomplete
5: Making a Script Executable
incomplete
6: Root User
incomplete
7: Chown
incomplete
8: Using sudo
incomplete
This lesson's interactive features are locked, please to keep using them
The "root" user is a superuser. It has access to everything on the system and can do anything. When you use the sudo command, you're running as the root user (as long as your system hasn't been configured differently).
The sudo keyword is convenient because it quickly gives you elevated permissions to run a single command.
-- xkcd
However, it can also be dangerous because it gives you access to everything. If you run a command with sudo that you don't understand, you could do serious damage to your system.
For example, rm with the r and f flags run on the root directory (/) attempts to delete all the files on your system. Don't do that. The r flag is for "recursive" (delete everything inside) and the f flag is for "force."
Modern versions of rm typically refuse to recursively delete /, even with sudo. But that safeguard doesn't protect against every destructive command. Deleting critical system files as root can still turn your computer into a very expensive paperweight.
Sure, as long as you understand what the command you're running does. Just be careful.