CLI Flashcards

1
Q

$ more

A

Display the contents of a file, starting at the top and letting the user scroll down

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

$ less

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

$ head

A

Display the first part of a file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

$ tail

A

Display the last part of a file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

$ man

A

Display command documentation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

/

A

Root directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

~

A

Home directory. Where a user is ‘placed’ by default when logged into the computer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

$ cat

A

Print all the contents of a file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

$ chmod

A

Set permissions on a file or directory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Why is the root user considered a ‘super user’?

A

Root can read, write, and delete any file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Why would you want to use sudo instead of root?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How do you check the permissions on a directory and it’s contents?

A

$ ls -lah

How well did you know this?
1
Not at all
2
3
4
5
Perfectly