![]() ![]() Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen. Just use those commands with caution, so you don’t wind up wreaking havoc on your Linux desktop or server. However, if there’s a command you must run, and it fails with a minimal sudo command, either sudo – or sudo su – will always work. Most often, you’ll only have to run basic sudo or su commands. See the example below: I am logged in as user1 in terminal. If you issue the command sudo su, you switch to the root user without resetting the environment variables, so you have the root user privileges, but not the environment. Linux sudo su - privilege command is similar to su- command that opens an interactive login shell that is used to s witch u ser ( root or any standard user ) and change the current user home directory. bashrc files by root, but only if the user running the command is defined in the /etc/sudoers file, effectively becoming the root user, even if the root user is disabled, such as it is in Ubuntu. If you run the command sudo su – you will switch to the root user which will then execute all /etc/profile. sudo -i: This allows you to interactively access the root account without direct access using your current password. sudo su: can also be used to switch to any normal or root user account with your current password. If you use just sudo, you execute a command with admin privileges. su: will allow you to switch to any user account or superuser account with their account password. SEE: Linux file and directory management commands (TechRepublic Premium) Execute the command su – and you invoke a login shell after switching the user, which resets most environment variables, providing a clean base. Sudo, short for superuser do, is a command that allows a user to execute a command as another user by entering their own password. If you issue the command su, you switch your user to root, which then executes only the. su, short for switch user, is a command that allows a user to switch to another user account, the root account, by entering the target user’s password. There are different ways to use sudo and su. Must-read security coverageĪtlas VPN Review (2023): Features, Pricing, AlternativesĪustralia, New Zealand Enterprises Spend Big on Security - But Will It Be Enough? Even though most every Linux distribution uses sudo, some of them (such as Fedora and openSUSE) allow you to su (switch user) to the super user account–otherwise known as root. ![]() Sudo stands for “super user do” and allows standard users to take admin-level actions, such as installing software. If you’re a new Linux admin, you probably at least know about sudo.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |