From the course: Complete Guide to Linux Security: Protecting Your Linux Server Environment
Unlock this course with a free trial
Join today to access over 25,200 courses taught by industry experts.
The su command - Linux Tutorial
From the course: Complete Guide to Linux Security: Protecting Your Linux Server Environment
The su command
- Su is short for substitute user. It's a great command that you can use in Linux to change from one user account to another. If you ever need to log in as a different user, the su command will facilitate this. If you look at the slide here, you'll see we have su <username> and also su - <username>. Sometimes I'll refer to this as su, sometimes I'll just say su to make it quicker, but this is the substitute user command. Some people say switch user. Previously, it was known as super user because we would use it to connect as root, but the proper name is substitute user. So, for example, you could do a su sysadmin or an su - sysadmin, and that will log in to the sysadmin accounts as long as you know the password for sysadmin. One difference between the two is that su leaves you in the current directory. So su by itself leaves you in your current directory in your current user, but su - puts you in the home directory of the user you're logging in as. Right, so to reiterate, su, that'll…
Download courses and learn on the go
Watch courses on your mobile device without an internet connection. Download courses using your iOS or Android LinkedIn Learning app.
Contents
-
-
(Locked)
Learning objectives1m 34s
-
(Locked)
Introduction to nftables and the nft command2m 34s
-
(Locked)
nftables setup4m 5s
-
(Locked)
Tables > Chains > Rules2m 31s
-
(Locked)
Building the nftables configuration, part 18m 41s
-
(Locked)
Building the nftables configuration, part 28m 39s
-
Saving and restoring the nftables configurations8m 36s
-
(Locked)
Translating iptables to nftables7m 49s
-
(Locked)
-
-
(Locked)
Learning objectives1m 18s
-
(Locked)
Review of SSH1m 47s
-
(Locked)
Using keys to connect via SSH12m 57s
-
(Locked)
The sshd_config file3m 19s
-
(Locked)
Modifying the default SSH port7m 32s
-
(Locked)
Disabling password-based SSH2m 57s
-
(Locked)
Disabling root login via SSH2m 32s
-
(Locked)
Exclusive SSH groups4m 37s
-
(Locked)
Authentication settings10m 6s
-
(Locked)
Terminating SSH connections, part 17m 45s
-
(Locked)
Terminating SSH connections, part 26m 51s
-
(Locked)