[LINUX] Let's clear the ambiguity of the hyphen (-) of the su command now! !!

First of all, from the review

The command to switch from the current user to another user on Linux is su. By the way, this is an abbreviation for ** substitute user **. (Reference: su (Unix) --Wikipedia) substitute means "use instead". The technique of changing only Pokemon is also called a substitute in English. It's not an abbreviation for switch user or super user.

How to use commands

$ su [-] <user name>

The basic command usage is as above, and if you do not specify a user name, you will be super user (root).

What does a hyphen mean?

The - in the su command means to inherit environment variables. In other words, adding - is the same as logging in as that user from the beginning.

at the end

I wonder if such a simple post is good once in a while

Recommended Posts

Let's clear the ambiguity of the hyphen (-) of the su command now! !!
Let's execute the command on time with the bot of discord
Let's decide the winner of bingo
Let's claim the possibility of pyenv-virtualenv in 2021
[Bash] Let's analyze the Fork bomb now
Migemo version of the: find command,: mfind
Let's summarize the construction of NFS server
Let's investigate the mechanism of Kaiji's cee-loline
Notice the completion of a time-consuming command
The story of misreading the swap line of the top command