CLI Flashcards
$ more
Display the contents of a file, starting at the top and letting the user scroll down
$ less
Display contents of a file with the ability to use arrow keys for going line-by-line and the PgUp/PgDn keys to navigate pages.
$ head
Display the first part of a file
$ tail
Display the last part of a file
$ man
Display command documentation
/
Root directory
~
Home directory. Where a user is ‘placed’ by default when logged into the computer.
$ cat
Print all the contents of a file.
$ chmod
Set permissions on a file or directory.
Why is the root user considered a ‘super user’?
Root can read, write, and delete any file.
Why would you want to use sudo instead of root?
Multiple reasons: Admin control, audit trail, obvious to user, 5 min ticket system.
Admins can configure sudo to provide root level access for specified commands and directories.
Sudo command creates a detailed audit trail.
When using sudo it is obvious to the user when they are running sudo commands because they are prefixed with sudo.
Sudo 5 minute ticketing system adds security to command line session.
How do you check the permissions on a directory and it’s contents?
$ ls -lah