From the course: Linux for PHP Developers
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Administration commands with sudo
From the course: Linux for PHP Developers
Administration commands with sudo
- [Instructor] Sometimes we'll need to perform administrative tasks that the current user doesn't have permission to do. The sudo command is used to run programs with the security privileges of another user. By default, this user is root. The name sudo is the combination of the su command, which allows you to use the shell of another user, and do, which isn't a command, it just means to take action. Think of sudo like trying to access the backstage of a concert. If you just try to walk in, the bouncer won't let you pass. However, if you use sudo and you say your password, he'll let you in. Let's see sudo in action by trying to access a file that we don't have permission for. There's a special file that contains one way encrypted passwords for all users. First, let's do a directory listing, ls -la, then the full path, which is /etc/shadow. The third column shows the owner of the file, which is root. And the fourth shows the group that the owner is in, which is shadow. My username is…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Talk to yourself with local networking6m 32s
-
(Locked)
Logging in using Secure Shell4m 47s
-
(Locked)
Using SSH on a Mac7m 7s
-
(Locked)
Using SSH on Windows4m 47s
-
(Locked)
Navigating a command-line shell5m 36s
-
Reading and searching files4m 42s
-
(Locked)
Administration commands with sudo3m 46s
-
(Locked)
-
-
-
-
-
-
-