Book Image

Linux Mint Essentials

By : Jay LaCroix
Book Image

Linux Mint Essentials

By: Jay LaCroix

Overview of this book

Table of Contents (22 chapters)
Linux Mint Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Running commands or programs as other users


There may come a time where you need to impersonate another user on your system. In some of our examples so far, we've used the sudo command, which essentially runs commands as the root user. On a Linux system, the root account is the account that has access to basically everything. If Linux was a game of chess, think of the root account as the queen—it can go wherever it wants and delete whatever it wants.

Note

In Linux Mint (as well as most Ubuntu derivatives), the root account is disabled by default. Although the root account is disabled, you can still run commands as the root. Technically, the sudo command impersonates the root and works even if the root account is disabled. You can enable the root account with the sudo passwd command and disable it once again with the sudo passwd -l root command.

While we'll go over the technical details of the sudo command in the next section, it's important to understand how to run commands as a different user...