Tech News
← Back to articles

Logging in as root on Linux? Here's why that disaster waiting to happen

read original related products more articles

Andrey Deryabin / iStock / Getty Images Plus

Follow ZDNET: Add us as a preferred source on Google.

ZDNET key takeaways

Logging in as the root user should never be done on Linux.

Using the root account could lead to disaster.

Sudo is the preferred method of gaining elevated privileges.

When I first started using Linux in 1997, there was one inevitability: at some point, you would have to either log in as root or switch to the root account. I did it. A lot.

Also: Do you need antivirus on Linux?

Anytime I needed to install a piece of software, change a config file in /etc, start or stop a service, or upgrade the OS -- any action that required heightened (admin) privileges -- I used the root account.

Whenever I needed to access those heightened permissions, I would do one of two things: use the su command to switch to the root user, or log in to the desktop as the root user. Either way, I had to know the root password to do so.

... continue reading