Linux Commands Flashcards

1
Q

What does LS do

A

Simply lists all files in directory

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

What does LS do

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

What does PWD do

A

Prints working directory

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

What does MV do

A

Helps you move a file from one location to another, i.e. mc mvtesting.txt /home/kola/downloads

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

How do I change the permisions of a file?

A

Using the chmod command

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

What does cp do

A

Copies a file, cp testing.txt /home/kola/downloads

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

What does rm, and rmdir do

A

Delets a file (RM Testing123.txt) or a registery (rmdir old_folder)

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

What does chown do?

A

CLets you amend the owner of a file (sudo chown YK script.ssh) , YK is now the owner

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

How do I install an applciation?

A

sudo apt-get install “nameofprogram”

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

What does df-h show?

A

It shows the free space on a drive in GB

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

What does ps -e | -more show?

A

Shows ALL process running in the background , |e specifies for all users

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

what does the top

A

Similar to ps |e shows all process running, but shows the top ones first

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

How do you create a new file?

A

Using the touch command so touch newfile.txt

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

How do I stay in super user

A

Sudo su

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

How do i create a new user?

A

Using adduser “name”

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

How do I change the user

A

Su -“name”

16
Q

How do I check all users on system

A

cat /etc/passwd

17
Q

How do I delete user?

A

sudo userdel “name”

18
Q

How do I add a user to a group

A

Sudo usermod -aG sudo “name”

19
Q

How do I remove an individual from a group

A

sudo gpasssword -d name sudo, removes “name” from the sudo group