Basic Commands Flashcards

1
Q

Runlevel

A

-determines which level machine is running on

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

Init 0-6

A

-whole server action

0 - Halt (sleep mode)
1 - Single-user mode (safe)
2 - Multi-user mode w/out networking
$3 - Multi-user mode w/ networking$
4 - NO FUNCTION 
5 - Graphic User Interface (GUI)
6 - Reboot
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Chkconfig

A
  • sees all services running
  • Chkconfig (service) on/off (turns service on/off at startup)
  • Chkconfig | grep service (checks particular run levels of service)
  • Chkconfig –level (run level[s]) on/off (turns particular run levels on/off for selected service)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Fg

A

-brings the most recent job to foreground

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

bg

A

-lists stopped or background jobs; resumes a stopped job in the background

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

Ln -s FILE LINK

A

-create a symbolic LINK to FILE

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

Pwd

A

-show current directory

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

Ls -al

A

-formatted listings w/ hidden files

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

gzip -d FILE.gz

A

-decompressed FILE.gz back to FILE

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

Ctrl +r

A

-bring up a recent command

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

Ctrl +u

A

-erases the whole line

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

Ctrl +w

A

-erases one word in the current line

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

Ctrl +d

A

-log out of current session (like “exit” command)

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

Ctrl +c

A

-halts the current command

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

Ctrl +l

Clear

A

-erase all

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

More FILE

A

-output the contents of FILE

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

!!

A

-repeats the last command

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

Ssh-copy-id USER@HOST

A

-add your key to HOST for USER to enable a keyed or password-less login

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

W

A

-display who is online

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

Finger USER

A

-display information about USER

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

Uname -a

A

-show kernel information

22
Q

Tar czf FILE.TAR.GZ FILE

A

-create a tar with Gzip compression

23
Q

Tar xzf FILE.TAR.GZ

A

-extract a tar using Gzip

24
Q

Du

A

-show directory space usage

25
Du -sh
-shows usage for CURRENT directory
26
Whereis APP
-shows possible location of APP
27
Which APP
-show which app will be run by default
28
Grep -r PATTERN DIR
-search reclusively for PATTERN in DIR
29
Fg n
-brings jobs n to the background
30
COMMAND | grep PATTERN
-search for PATTERN in the output of COMMAND
31
Locate FILE
-find all instances of FILE
32
Ssh -p PORT USER@HOST
-connect to HOST on port PORT as USER
33
Ssh USER@HOST
-connect to HOST as USER
34
Date
-shows current date and time
35
Uptime
-show current uptime
36
Whoami
-who you are logged in as
37
Man COMMAND
-shows the manual for COMMAND
38
Dig DOMAIN
-get DNS information for DOMAIN
39
Dig -x HOST
-reverse lookup HOST
40
Wget -c FILE
-continue a stopped download
41
Make install ./configure Make
-install from source
42
Dpkg -i PKG.DEB
-install a package (Debian)
43
Cat > FILE
-places standard input into FILE
44
Ps
-display your current active process
45
Top
-display all running processes
46
Whois DOMAIN
-gets Whois information for DOMAIN
47
Killall PROC
-kill all processes named PROC
48
Kill pid
-kill process id PID
49
Tail -f FILE
-output the contents of a file as it grows, STARTING WITH LAST 10 LINES
50
Head FILE
-output the first 10 lines of FILE
51
Tail FILE
-output the last 10 lines of FILE