Introduction to Linux (Navigating the file system) Flashcards

1
Q

How to print working directory (CLI)

A

pwd

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

How to list all files (incl hidden files) (CLI)

A

ls -la

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

how to get explanation and combinations of a command (CLI)

A

man ls (or any other command following man (manual) )

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

how to print something to the screen/write to a file? (CLI)

A

with the echo command (use > to write to a file)

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

how to print file content to screen (CLI)

A

with the cat command

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

What to do if you can’t locate an existing file? (CLI)

A

update db with updatedb command

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

How to change current password? (CLI)

A

passwd

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

how to change user permissions of a file? (CLI)

A

chmod + rwx hello.txt OR chmod 777 hello.txt

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

What does chmod 0 do to file permissions? (CLI)

A

— permission

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

What does chmod 1 do to file permissions? (CLI)

A

–x permission

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

What does chmod 2 do to file permissions? (CLI)

A

-w- permission

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

What does chmod 3 do to file permissions? (CLI)

A

-wx permission

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

What does chmod 4 do to file permissions? (CLI)

A

r– permission

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

What does chmod 5 do to file permissions? (CLI)

A

r-x permission

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

What does chmod 6 do to file permissions? (CLI)

A

rw- permission

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

What does chmod 7 do to file permissions? (CLI)

A

rwx permission

17
Q

How to change to other user? (CLI)

A

su john

18
Q

How to add a user? (CLI)

A

sudo adduser john

19
Q

How to pull specific string/element out of a file?

A

grep

20
Q

How to see what commands you can run

A

sudo -l