Bash (Linux/Unix) Flashcards

1
Q

pwd

A

print working directory

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

hostname

A

my computer’s network name

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

mkdir

A

make directory

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

cd

A

change directory

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

ls

A

list directory

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

rmdir

A

remove directory

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

pushd

A

push directory

(add directory to the stack)

don’t go to much into stacks at this point, come back to later

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

popd

A

pop directory

(removed directory from the stack)

don’t go to much into stacks at this point, come back to later

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

cp

A

copy file or directory

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

mv

A

move file or directory

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

less

A

allows users to view the content of a file or output in a scrollable manner.

It’s especially useful for reading large files or paginated command output without loading everything into memory at once.

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

cat

A

print the whole file

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

xargs

A

execute arguments

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

find

A

find files

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

man

A

read a manual page - documentation in linux

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

apropos

A

find which manual page is appropriate

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

env

A

look at your environment

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

echo

A

display a string or text to the terminal

frequently used utility for printing output, debugging scripts, and creating text files.

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

export

A

export/set a new environmental variable

20
Q

exit

A

exit the shell

21
Q

sudo

A

“super user do” runs a command with elevated privileges

22
Q

(reverse card)

print working directory

23
Q

(reverse card)

my computer’s network name

24
Q

(reverse card)

make directory

25
Q

(reverse card)

change directory

26
Q

(reverse card)

list directory

27
Q

(reverse card)

remove directory

28
Q

(reverse card)

push directory

(add directory to the stack)

don’t go to much into stacks at this point, come back to later

29
Q

(reverse card)

pop directory

(removed directory from the stack)

don’t go to much into stacks at this point, come back to later

30
Q

(reverse card)

copy file or directory

31
Q

(reverse card)

move file or directory

32
Q

(reverse card)

page through a file

33
Q

(reverse card)

print the whole file

34
Q

(reverse card)

execute arguments

35
Q

(reverse card)

find files

36
Q

(reverse card)

read a manual page

37
Q

(reverse card)

find which manual page is appropriate

38
Q

(reverse card)

look at your environment

39
Q

(reverse card)

print some arguments

40
Q

(reverse card)

export/set a new environmental variable

41
Q

(reverse card)

exit the shell

42
Q

(reverse card)

“super user do” runs a command with elevated privileges

43
Q

ls -a

A

list files and hidden files
.<filename></filename>

44
Q

ls -F

A

list file type
/ Directory
@ Link
* Executable

45
Q

chmod
(def & how to use)

A

change mode command - changes user permissions

chmod [ugoa] [+-=] [rwx]

command + user category + add,subb,set + permission

46
Q

chgrp

A

change the file’s group

47
Q

umask

A

file creation mask command - sets the default permissions for a file