Linux commands Flashcards

(19 cards)

1
Q

ls

A

List all contents of the directory.

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

pwd

A

Prints working directory (shows your current location’s full path).

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

cd

A

Change directory.

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

cd ~

A

Move to the user’s Home directory.

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

cd ..

A

Move up one level to the Parent directory.

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

cd -

A

Move to the previous directory you were just in.

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

mkdir

A

Make directory (creates a new folder).

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

touch

A

Create a new, empty file, or update an existing file’s timestamp.

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

cp

A

Copy files or directories.

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

mv

A

Move or rename a file/directory.

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

rm

A

Remove (delete) files.

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

cat

A

Catenate/display the contents of a file to the screen.

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

grep

A

Search for a pattern within files (Global Regular Expression Print).

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

ps

A

List processes currently running on the system.

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

man

A

Display the manual page/detailed help for a command.

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

–help

A

Display a brief help summary for a command.

17
Q

sudo

A

Super User do (Execute a command with root/administrator privileges).

18
Q

what is the pipe (|) used for?

A

Used to chain commands together.

19
Q

How would you export a namespace?

A

export NAMESPACE=my-namespace
You would use it in a kubectl command like this: kubectl get pods -n $NAMESPACE