Linux 1 Flashcards

(79 cards)

1
Q

Halt

A

This command shuts down the operating system but can be run only by the root user.

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

Reboot

A

This command shuts down and restarts the operating system. It also can be run only by root.

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

Init 0

A

This command also shuts down the operating system and can be run only by your root user.

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

Init 6

A

This command also shuts down and restarts the operating system. It also can be run only by root.

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

Shutdown.

A

This command can be used by root to shut down or reboot the system.

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

Exit

A

This command terminates the currently running process, including the current shell session.

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

Su

A

Switch user. This command switched from the current user to a new user account.

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

Env

A

This command displays the environment variables for the currently logged-in user.

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

Echo

A

This command is used to echo a line of text on the screen.

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

Top

A

Displays a list of all applications and processes currently running on the system.

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

Which

A

Displays the full path to a shell command or utility.

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

Whoami

A

Displays the username of the current logged-in user.

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

Netstat

A

Displays the status of the network, including current connections, touring tables, and so on.

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

Route

A

View or manipulate the systems routing table.

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

Ifconfig

A

Manage network boards installed in the system. Can only be run by the root user.

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

Unamed

A

Returns information about your Linux system.

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

-s

A

Linux’s kernel name

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

-n

A

System’s hostname

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

-r

A

Linux’s kernel’s release number.

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

-v

A

Linux kernel’s version number

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

-m

A

System’s hardware architecture (x86-64)

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

-p

A

Processor type

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

-I

A

Hardware platform.

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

-o

A

Operating system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
-a
Displays all information.
26
Histsize or histfilesize
Configure the size of your history file.
27
Histcontrol
Controls how your command history is stored. Variable can be set to a value of ignoredups, ignoredspace, ignoreboth, or eraseups.
28
Ignoreups
Ignore duplicates in history
29
Ignorespace
Ignore commands that start with spaces.
30
Ignoreboth
Specifies ignorespace and ignoreups.
31
Eraseups
Remove all duplicate entries in the history file.
32
MANPATH
echo $MANPATH
33
echo $SHELL
Find default shell
34
ls
List directory
35
ls -l
Long list
36
echo $PATH
Current users PATH variable.
37
Exec
Execute file
38
man -kan
Search across all man page names and descriptions to find a specific keyword
39
rmdir
Remove directory
40
apropos
Search man pages
41
info
Info pages
42
variable=value
Change variable.
43
alias name=command
Change name of command | alias ldir="ls -l"
44
Redirect output
command output > filename
45
Redirect output without erasing data
command output >> filename
46
Redirect stderr and stdout to text files.
command 1> stdout_filename 2> stderr_filename
47
Redirect input
command < input_text_or_file
48
Piping
command | grep expression | cat /var/log/messages | more
49
Display command on screen and write to a file
command | tee file_name | ls -l | tee output.txt
50
Text editor
vi filename.txt
51
Insert text in vi
``` I Insert S O A ```
52
Enter command line mode in vi
w filename
53
Exit
Writes the current file and then closes vi
54
wq
Also writes the current file to disk and closes vi.
55
q
Closes vi without saving the current file. This can be used only if the filename hasn't been changed. If the file has been changed enter q!
56
w!
Overwrites the current file
57
e!
Forgets changed since the last write.
58
dw
Deletes the word that comes immediately after the cursor, including the space
59
de
Deletes the word that comes immediately after the cursor not including the space.
60
d$
Deletes from the insertion point to the end of the line.
61
dd
Deletes the entire current line
62
p
Inserts the text deleted in the last deletion operation after the current cursor location
63
u
Undoes the last action
64
D
Deletes the rest of the current line from the cursor position.
65
yy
Copies the line in which the cursor is located on the buffer
66
a
Append after cursor
67
A
Append after line
68
C
Change to the end of the line.
69
cw
Change the current word with new text, starting with the the character under the cursor, until ESC is hit
70
cc
Change the whole line
71
ZZ
Saves the current file and ends vi
72
h
Moves the cursor left one character.
73
j
Moves the cursor down one line
74
k
Moves the cursor up one line
75
l
Moves the cursor right one
76
0
Moves the cursor to the start of the current line
77
CTRL-G
Displays a status line at the bottom of the interface. Displays the name of the file, the total number of lines in the file, and the current cursor location.
78
/search_term
Searches for the next instance of the term specified. /5901
79
?/search_term
Searches for the previous instance of the term specified.