Linux commands Flashcards

1
Q

What is a root directory?

A

is the directory on Unix-like operating systems that contains all other directories and files on the system and which is designated by a forward slash ( / )

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

What command brings you to the root directory?

A

cd /

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

What command lists the contents of the current working directory?

A

ls

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

How can you return to a users home directory?

A

cd ~ (tindle)

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

How can you print the working directory?

A

pwd

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

What is an absoloute path?

A

also referred to as an absolute path or a full path, is the location of a file or directory relative to the root directory

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

What is a relative pathname?

A

contrasts with an absolute pathname in that it tells the location of a file or directory relative to the current directory (i.e., the directory in which the user is currently working) rather than from the root directory.

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

What is the command to change directory?

A

cd

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

What is the command to copy a file?

A

cp /location.xxx /destination.xxx

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

What command do you use to read the contents of a file?

A

cat

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

How do you display the calendar in linux?

A

cal

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

How can the manual for a particular linux command be accessed?

A

man cmd

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

Hopw do you create a text file in linux?

A

echo “text” dir/filename.txt

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

How do you delete a file in linux?

A

rm /dir/filename.xxx

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

How can you copy a file using the relative path?

A

cp ../../filename ../../dir/filename.xxx

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

how can you copy a file using absoloute path?

A

cp /dir/filename.xxx /dir/filename.xxx

17
Q

What command do you use to move a file?

A

mv

18
Q

What command removes a directory?

A

rmdir

19
Q

What does adding -rf do to the remove file command?

A

r = recursive f=force.

20
Q

How do you display the running processes in real time?

A

top

21
Q

How do you display a snapshot of the running process?

A

ps

22
Q

How do you display a snapshot of the running processes for the current user?

A

ps -u

23
Q

Which command displays the current user name?

A

whoami

24
Q

How do you display the list of commands that have been entered?

A

history

25
Q

How do you kill a process?

A

kill [process id]

26
Q

How do you quit the terminal?

A

exit

27
Q

how do you display the list of users loggin in on the computer?

A

who or w