Learn Linux in 5 Days Flashcards

1
Q

Kernel sits between :

A

Hardware and Software

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

Linux can be used on a:

A

Server or Desktop

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

Most used Linux Distros are:

A

redhat Enterprise Linux = RHEL and ubunto

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

Redhat distros for free are:

A

AlmaLinux and rocky Linux

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

Other Distros to try:

A

Linux Mint
Manjaro
Pop!_OS
Fedora
Debian
openSUSE
Arch Linux
Slackware

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

wsl -l -o / -l and -o stand for:
wsl –install -d debian / -d stand for:

A

-l stands for list
-o stands for online
-d stands for distro

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

How to remove a distro from wsl::

A

wsl –unregister Debian
“make sure you are not in Linux”

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

What is OVA

A

Open Virtual Appliance File

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

What command powers off and shuts down the system.

A

sudo shutdown now

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

Root is basically known as__________ in the directory structure

A

slash or /

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

Where do you find Binaries (or string code) and other executable files?

A

/bin

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

Where do you find System configuration files?

A

/etc

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

Home directories are found in:

A

/home

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

Optional or third party software ( software that is not bundled with the OS ) is found in :

A

/opt

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

Temporary files that are typically cleared on reboot are located:

A

/tmp

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

User related programs such as binaries and executables are found in:

A

/usr

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

Things that change often, variable data ( thinks that changed often ), most notably log files are located in:

A

/var

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

Files needed to start or boot the operating system like the Linux kernel are found in:

A

/boot

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

Control Groups heirarchy are found in:

A

/cgroup

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

Device files, typically controlled by the operating system and the system administrators are found in:

A

/dev

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

Shared file systems are found in:

A

/export

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

System libraries are found in:

A

/lib

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

64bit system libraries are found in:

A

/lib64

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

This command is used by the file system to store recovered files after a file system check.

A

/lost+found

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
This command is used to mount removable media such as (CD-Roms, USBs )
/media
26
The home directory for the "root" account is:
/root
27
This command is used to mount external file systems:
/mnt
28
This command provides info about running processes.
/proc
29
System administration binaries are located in:
/sbin
30
This command is used to display information about SELinux:
/selinux
31
This directory contains data which is served by the server:
/srv
32
Web Server Files are located in the ________ directory
/srv/www
33
FTP files are located in the ___________ directory
/sry/ftp
34
This command is used to display and sometimes configure the devices known to the Linux kernel:
/sys
35
Binaries and other executable programs are located in:
/usr/bin
36
You can find a list of libraries in:
/usr/lib
37
Locally installed software that is not part of the base operating system is found in?
/usr/local
38
System administration binaries are found in:
/usr/sbin
39
Log files are found in:
/var/log
40
examples of where software not installed or bundled with the Linux operation system are located: /usr/local/crashplan/bin /usr/local/crashplan/etc /usr/local/crashplan/lib /usr/local/crashplan/log
41
example of the location of an anti-virus software not installed with the Linux operation system: /opt/avg/bin /opt/avg/etc /opt/avg/lib /opt/avg/log
42
Variations of locations for installed software: /etc/opt/myapp /opt/myapp/bin /opt/myapp/lib /var/opt/myapp
43
Sometime applications are installed in the local directory in a shared manner: /usr/local/bin/myapp /usr/local/etc/myapp.conf /usr/local/lib/libmyspp.so
44
Other examples of software installations not installed or shipped with the Linux operating system are located in the /opt or /usr/local directories: /opt/google /opt/google/chrome /opt/google/earth /opt/web-team /opt/acme/web-team /usr/local/acme/web-team
45
The most common directories are:
/ /bin /etc /home /opt /tmp /usr /var
46
The default interface to Linux is:
Shell
47
A Program that accepts your commands and executes those commands and is also called a command line interpreter is:
Shell
48
Command Line Interface vs a GUI
The command line is more powerful. There will always be a command line. Server Distributions do not include GUI's Connecting to the internet you will use Shell Desktop Linux Distros have both GUI's and CLI's
49
You can use the command _________ to browse any page you want.
LYNX
50
The ____ sign is present when you are logged in as a super user.
pound ( # )
51
The____ is a short hand way of showing a home directory. When it's displayed by itself it represents your or current login's Home directory.
Tilda ( ~ )
52
Examples of using the Tilda command
~jason = /home/jason ~pat = /home/pat !root = /root ~ftp = /var/ftp
53
_________ is the Superuser
Root
54
normally Linux commands are case sensitive
55
What command displays the present working directory
pwd
56
What command changes your present working directory
cd
57
Lists directory contents
ls
58
Long lists of directory contents
ls -l
59
Concatenates or displays files
cat
60
clears the screen in linux
clear
61
Displays the online manual for command
man
62
to see a list of directory contents in reverse order
ls -r
63
to Display the next page in the man command:
Space bar
64
If you want to quit the man command type:
q
65
While using the man pages these commands help you move around
Enter move down one line Space move down one page g move to the top of the page G move to the bottom of the page
66
Storage location that has a name and a value typically uppercase Access the contents by executing: echo $VAR_NAME
Environmental Variable
67
An environment variable that Controls the command search path Contains a list of directories
PATH ex: echo $PATH
68
Locate or learn the full path to a command using:
which ex: which ls
69
displays a files content in reverse order
tac ex: which tac will show /usr/bin/tac
70
Starting to fish or learn Linux you could:
Look at directories in $PATH Look at the files in each directory Use man to learn what the command does
71
Get Help using these commands:
--help or -h or use the man commands
72
If you are not sure what commands to use type:
man -k SEARCH TERM ex: man -k calendar
73
__________ are containers for other files and directories
Directories
74
__________ can be accessed by name or shortcut
Directories
75
Directory shortcuts
. means this or current directory .. means parent directory or the one directly above the current cd - change to the previous directory
76
what is the Directory separator in Linux
/ ( forward slash )
77
Executing commands
$PATH determines command search path You can specify a command with a full path. You can execute command not in $PATH. ./command = Execute command in this dir
78
Command for creating or making a directory;
mkdir
79
command to remove a directory
rmdir ( only removes the directory if its empty )
80
Recursively (everything) removes directory
rm -rf ( removes the directory and everything below it ), and can't get it back once it's deleted.
81
To see detail options of files and directories that exist you type:
ls -l
82
When you find files that begin with a "." or period are known as:
Hidden or Dot files
83
To show hidden files with" ls ", use:
ls -a
84
Command options can be combined
ls -l -a is the same as ls -la and ls -al
85
What command reveals file types?
ls -F
86
file types
/ - Directory @ - Link * - Execute
87
A " Symbolic Link " can be used to :
Create a shortcut For long file or directory names to indicate the current version of software
88
list files by time:
ls -t
89
list files in reverse order:
ls -r
90
long listing including files, in reversed order, and sorted by time:
ls -latr
91
To list all recursively content in the current directory and all directories below that?
ls -R
92
the Tree command is similar to ls -R, but creates visual output
tree -d list directories only tree -C Colorize ouput
93
this command lists the directory name but not the contents
ls -D
94
to colorize output you would use the ____________ command
ls --color
95
When creating file or directory names, do not use "Spaces" instead:
Hypens - Underscores _ CamelCase ( or capitalize the first letter of each word ) Encapsulate the entire file name in quotes Use a backslash \ to escape spaces
96
permission "Execute or x "
File - Directory - allows the execution of a file Allows access to contents and metadata for entries
97
permission categories
- Symbol - - Category - u User g Group o Other a All
98
this command displays a user's groups
groups
99
Change mode command
chmod
100
user category: User, group, other, all
ugoa
101
Add, subtract, or set permissions
+ - =
102
permission layout
-rw-r--r-- first three are for the user 2nd three are for the users group 3rd three are for all others
103
Permission order:U is always 1st, G is always 2nd and O is always 3rd
.........................U G O Symbolic rwx r-x r-- Binary 111 101 100 Decimal 7 5 4
104
In general it's not good to use these 2 permissions:
666 or 777
105
to change the primary group of a file
chgrp
106
to move a file or directory use this command:
mv
107
This determines the default permissions
File creation mask
108
If no mask were used, permissions would be:
777 for directories 666 for files
109
the ______ sets the file creation mask to [mode], if given
umask command ex: umask [-S] [mode] Use -S to for symbolic notation
110
Special modes are:
setuid setgid sticky
111
this command lists files that match pattern faster than the find command queries an index results are not in real time may not be enabled on all systems
locate [Pattern] or command
112
find command
* Gets real-time results * good for advanced searches
113
locate command
* results may be a day old * good for simple searches
114
displays the contents of a file
cat file
115
browse through a text file
more file
116
more features than more
less file
117
Output the beginning (or top) portion of file
head file
118
Output the ending (or bottom) portion of file
tail file
119
by default Head and tail only displays 10 lines
change the behavior with -n n=NUMBER OF LINES tail -15 file.txt
120
to view files in real time or as they are being written
tail -f file
121
is a simple editor Easy to learn not advanced and vi or emacs if it's not available, look for pico
nano editor
122
Using vi editor
vi [ file name ] to edit the file vim [ file ] same as vi but has more features view [ file ] starts vi in read only mode :qa and enter to exit vi
123
vi command mode and navigation
k up one line j down one line h left one character l Right one character w Right one word b left one word ^ go to the beginning of the line $ go to the end of the line
124
vi insert mode
i Insert at the cursor position I Insert at the beginning of the line a Append after the cursor position A Append at the end of the line.
125
vi line mode
:w Writes (saves) the file :w! Forces the file to be saved :q quit :q! quit without saving changes :wq! Write and quit :x same as :wq :n is where "n" is actually the line number so you can jump to a certain line, ex- :4 :$ Positions the cursor on the last line :set nu Turns on line numbering :set nonu Turns off line numbering :help [command you need help with]
126
VI has 3 modes:`
mode key command esc Insert iIaA (either of these) Line :
127
VI - repeating commands
Repeat a command by preceding it with a number: 5k = Move up a line 5 times 80i = Insert 80 times 80i_ = Insert 80"_" characters
128
Vi - deleting text
x deletes a character dw deletes a word dd deletes a line D Delete from the current position
129
Vi - Changing text
r Replace the current character cw Change the current word cc Change the current line c$ change the text from the current position C Same as c$ ~ Reverses the case of a character
130
vi - Copying and Pasting
yy Yank (copy) the current line y Yank the p Paste the most recent deleted or yanked text
131
Vi - Undo/Redo
u undo ctrl-r Redo
132
Vi - Searching
/ Starts a forward search ? Starts a reverse search
133
vimtutor - will help you by walking through the command, like a tutorial / how to
134
Emacs file editor
To edit a file: emacs < file name >