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
Q

Du -sh

A

-shows usage for CURRENT directory

26
Q

Whereis APP

A

-shows possible location of APP

27
Q

Which APP

A

-show which app will be run by default

28
Q

Grep -r PATTERN DIR

A

-search reclusively for PATTERN in DIR

29
Q

Fg n

A

-brings jobs n to the background

30
Q

COMMAND | grep PATTERN

A

-search for PATTERN in the output of COMMAND

31
Q

Locate FILE

A

-find all instances of FILE

32
Q

Ssh -p PORT USER@HOST

A

-connect to HOST on port PORT as USER

33
Q

Ssh USER@HOST

A

-connect to HOST as USER

34
Q

Date

A

-shows current date and time

35
Q

Uptime

A

-show current uptime

36
Q

Whoami

A

-who you are logged in as

37
Q

Man COMMAND

A

-shows the manual for COMMAND

38
Q

Dig DOMAIN

A

-get DNS information for DOMAIN

39
Q

Dig -x HOST

A

-reverse lookup HOST

40
Q

Wget -c FILE

A

-continue a stopped download

41
Q

Make install
./configure
Make

A

-install from source

42
Q

Dpkg -i PKG.DEB

A

-install a package (Debian)

43
Q

Cat > FILE

A

-places standard input into FILE

44
Q

Ps

A

-display your current active process

45
Q

Top

A

-display all running processes

46
Q

Whois DOMAIN

A

-gets Whois information for DOMAIN

47
Q

Killall PROC

A

-kill all processes named PROC

48
Q

Kill pid

A

-kill process id PID

49
Q

Tail -f FILE

A

-output the contents of a file as it grows, STARTING WITH LAST 10 LINES

50
Q

Head FILE

A

-output the first 10 lines of FILE

51
Q

Tail FILE

A

-output the last 10 lines of FILE