Understanding root and sudo Privileges
Some of the things you’ll do in this course will require you to have administrative privileges. While it’s possible and convenient to just log into the root command prompt, that’s something that I like to discourage as much as possible. For best security, and to get used to what you’d be doing in an enterprise setting, your best bet is to use sudo
.
Modern Linux distros allow you to add yourself to an administrators’ group as you install the operating system. (That’s the wheel
group on Red Hat-type systems, and the sudo
group on Debian/Ubuntu-type systems.) To run a command that requires administrative privileges, just do something like this:
sudo nftables list ruleset
You’ll then be asked to enter the password for your own user account, rather than the one for the root user account.
That’s about all we need to say about this topic, so let’s summarize and move on to the next chapter.