Switching user
Introduction
This lesson will cover how to switch to other accounts and how to run commands and programs as other users.
The su command
One way to start a session as another user on the system is to use the su command. The syntax for su is:
su [username]
If no arguments are supplied, it assumes that you are trying to become the superuser or root account. Executing su without any options is the same thing as su root.
The details of su is covered in su command.
The sudo - Super User Do
Another way to switch users or execute commands as others is to use the sudo command. The syntax for sudo udis:
sudo command
Thesudo allows you to run programs with the security priviledges of another user. Like su, if no username is specified, it assumes that you were trying to run commands as the superuser. This why sudo is referred to as superuser do.
The details of sudo is covered in sudo command.
References & Resources
- N/A
Latest Post
- Dependency injection
- Directives and Pipes
- Data binding
- HTTP Get vs. Post
- Node.js is everywhere
- MongoDB root user
- Combine JavaScript and CSS
- Inline Small JavaScript and CSS
- Minify JavaScript and CSS
- Defer Parsing of JavaScript
- Prefer Async Script Loading
- Components, Bootstrap and DOM
- What is HEAD in git?
- Show the changes in Git.
- What is AngularJS 2?
- Confidence Interval for a Population Mean
- Accuracy vs. Precision
- Sampling Distribution
- Working with the Normal Distribution
- Standardized score - Z score
- Percentile
- Evaluating the Normal Distribution
- What is Nodejs? Advantages and disadvantage?
- How do I debug Nodejs applications?
- Sync directory search using fs.readdirSync