This is an old revision of the document!
Log In And Switch Users In Multiuser Targets
General Information
Targets are the new “runlevels” equivalent if you are coming from RHEL 6.
View default target (target at boot)
~$ systemctl get-default multi-user.target
Switch User to root
su -
- -, -l, –login ⇒ Load login profile (~/.bash_profile)
- When no username is specified after options (such as -), root is assumed
Types of profiles
- ~/.bash_profile ⇒ Execute upon login shells
- ~/.bashrc ⇒ Execute on every shell
- /etc/profile ⇒ Executed on every user login (system wide environmentals)
- /etc/bashrc ⇒ Executed on every user interactive shell (system wide functions and aliases)