basic commands Flashcards

the most basic and common linux commands (debian) (31 cards)

1
Q

pwd

A

prints the current working directory

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

ls

A

lists contents of directory
usage: ls [directory] (if no directory specified, will list current directories contents)

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

cd

A

changes directory
usage: cd [target-directory]

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

touch

A

creates an empty file
usage: touch [filename]

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

cp

A

copy files to directories
usage: cp [source] [destination]

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

mv

A

moves files to directories
usage: mv [source] [destination]

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

rm

A

removes files or directories
usage: rm [filename]

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

mkdir

A

makes a directory
usage: mkdir [directoriesname]

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

rmdir

A

removes an empty directory
usage: rmdir [directoriesname]

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

less

A

paginating a text file to be read easily
usage: less [filename]

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

cat

A

shows content of a text file (not recommended for large text files)
usage: cat [filename]

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

nano

A

open text files in nano text editor (simple and beginner-friendly)
usage: nano [filename]

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

vim

A

open text files in VIM editor [more advanced]
usage: vim [filename]

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

chmod

A

changes file permissions
usage: chmod [mod] [filename]
get more details from article below:
https://www.notion.so/chmod-guide-27209ea7608c80bd90adc55cb45aabd8

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

chown

A

changes files ownership
usage: chown user:group [filename]

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

df -h

A

display disk usage(-h is the flag for human-readable output)

17
Q

free -h

A

display memory usage(-h is the flag for human-readable output)

18
Q

top

A

monitor running processes

19
Q

htop

A

top command with a better interface

20
Q

uname

A

display system information(should be used by -a flag)

21
Q

whoami

A

shows the current user

22
Q

kill

A

terminates a program
usage: kill [PID]

23
Q

ps

A

list running processes

24
Q

wget

A

downloads files from web
usage: wget [URL]

25
man
display manual for a command usage: man [command]
26
clear
clear the terminal screen
27
sudo
runs a command as superuser usage: sudo [command]
28
history
shows previously used commands
29
find
search for files usage: find [/path] -name [filename]
30
ip addr
display network interface information
31
File
Shows some info about a file Usage:file [filename]