{"id":25664,"date":"2024-04-05T05:11:05","date_gmt":"2024-04-05T03:11:05","guid":{"rendered":"https:\/\/raspberrytips.com\/?post_type=glossary&p=25664"},"modified":"2024-04-05T05:11:48","modified_gmt":"2024-04-05T03:11:48","slug":"root","status":"publish","type":"glossary","link":"https:\/\/raspberrytips.com\/glossary\/root\/","title":{"rendered":"What is root on Linux?"},"content":{"rendered":"\n

In most cases, the term “root” on Linux refers to the system administrator account. “root” is the username for this account (like “administrator” on Windows). The root user has access to everything on the system (files, services, commands, etc.).<\/strong><\/p>\n\n\n\n

Typically, when you install Linux on a computer or Raspberry Pi, the root user is created by default, but not always enabled. You’ll usually create and use another user account (for yourself) that has more limited privileges on the system.<\/p>\n\n\n

\n
\"become<\/figure><\/div>\n\n\n

Security risks<\/h2>\n\n\n\n

Root has superuser privileges, which means it has the highest level of access to the system. <\/p>\n\n\n\n

This is convenient for system administrators, but can also be harmful, as the slightest wrong command or parameter can break everything. Using the root session directly is also risky in terms of malicious software, as installing it can break the entire system in a flash.<\/p>\n\n\n\n

For this reason, it’s not recommended to use the root user account directly. Instead, stay with your user account for day-to-day tasks, and only temporarily switch to the root session when necessary.<\/strong><\/p>\n\n\n\n

When connecting to a Linux server or Raspberry Pi via SSH, the root account is often forbidden and it’s not recommended to enable it (always connect as a normal user first).<\/p>\n\n\n\n

Read more about security here: 17 Security Tips From A Pro To Protect Your Linux Server<\/a>.<\/p>\n\n\n\n

Sudo command<\/h2>\n\n\n\n

In most cases, you don’t even have to use the root session, as all the main distributions are now using “sudo” instead.<\/p>\n\n\n\n

Sudo is a command that is prefixed to another command and allows you to temporarily gain root privileges just to run that specific command.<\/strong> This is a safe way to perform tasks that require more privileges than your current user account has.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

You can easily configure which users can or can’t use sudo, whether a password is required or not, etc. See the linked articles below for more details.<\/p>\n\n\n\n

Root directory<\/h2>\n\n\n\n

Just a quick word about another use of the term “root” that you may find in some tutorials.<\/p>\n\n\n\n

The term “root” also refers to the top-level directory of the Linux file system (“\/”).<\/strong><\/p>\n\n\n\n

Related articles<\/h2>\n\n\n\n