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
Q

This command is used to mount removable media such as (CD-Roms, USBs )

A

/media

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

The home directory for the “root” account is:

A

/root

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

This command is used to mount external file systems:

A

/mnt

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

This command provides info about running processes.

A

/proc

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

System administration binaries are located in:

A

/sbin

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

This command is used to display information about SELinux:

A

/selinux

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

This directory contains data which is served by the server:

A

/srv

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

Web Server Files are located in the ________ directory

A

/srv/www

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

FTP files are located in the ___________ directory

A

/sry/ftp

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

This command is used to display and sometimes configure the devices known to the Linux kernel:

A

/sys

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

Binaries and other executable programs are located in:

A

/usr/bin

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

You can find a list of libraries in:

A

/usr/lib

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

Locally installed software that is not part of the base operating system is found in?

A

/usr/local

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

System administration binaries are found in:

A

/usr/sbin

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

Log files are found in:

A

/var/log

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

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

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

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

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

Variations of locations for installed software:

/etc/opt/myapp
/opt/myapp/bin
/opt/myapp/lib
/var/opt/myapp

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

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

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

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

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

The most common directories are:

A

/
/bin
/etc
/home
/opt
/tmp
/usr
/var

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

The default interface to Linux is:

A

Shell

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

A Program that accepts your commands and executes those commands and is also called a command line interpreter is:

A

Shell

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

Command Line Interface vs a GUI

A

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

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

You can use the command _________ to browse any page you want.

A

LYNX

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

The ____ sign is present when you are logged in as a super user.

A

pound ( # )

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

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.

A

Tilda ( ~ )

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

Examples of using the Tilda command

A

~jason = /home/jason
~pat = /home/pat
!root = /root
~ftp = /var/ftp

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

_________ is the Superuser

A

Root

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

normally Linux commands are case sensitive

A
55
Q

What command displays the present working directory

A

pwd

56
Q

What command changes your present working directory

A

cd

57
Q

Lists directory contents

A

ls

58
Q

Long lists of directory contents

A

ls -l

59
Q

Concatenates or displays files

A

cat

60
Q

clears the screen in linux

A

clear

61
Q

Displays the online manual for command

A

man

62
Q

to see a list of directory contents in reverse order

A

ls -r

63
Q

to Display the next page in the man command:

A

Space bar

64
Q

If you want to quit the man command type:

A

q

65
Q

While using the man pages these commands help you move around

A

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
Q

Storage location that has a name and a value
typically uppercase
Access the contents by executing: echo $VAR_NAME

A

Environmental Variable

67
Q

An environment variable that
Controls the command search path
Contains a list of directories

A

PATH
ex: echo $PATH

68
Q

Locate or learn the full path to a command using:

A

which
ex: which ls

69
Q

displays a files content in reverse order

A

tac
ex: which tac
will show /usr/bin/tac

70
Q

Starting to fish or learn Linux you could:

A

Look at directories in $PATH
Look at the files in each directory
Use man to learn what the command does

71
Q

Get Help using these commands:

A

–help or -h
or use the man commands

72
Q

If you are not sure what commands to use type:

A

man -k SEARCH TERM
ex: man -k calendar

73
Q

__________ are containers for other files and directories

A

Directories

74
Q

__________ can be accessed by name or shortcut

A

Directories

75
Q

Directory shortcuts

A

. means this or current directory
.. means parent directory or the one directly above the current
cd - change to the previous directory

76
Q

what is the Directory separator in Linux

A

/ ( forward slash )

77
Q

Executing commands

A

$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
Q

Command for creating or making a directory;

A

mkdir

79
Q

command to remove a directory

A

rmdir ( only removes the directory if its empty )

80
Q

Recursively (everything) removes directory

A

rm -rf ( removes the directory and everything below it ), and can’t get it back once it’s deleted.

81
Q

To see detail options of files and directories that exist you type:

A

ls -l

82
Q

When you find files that begin with a “.” or period are known as:

A

Hidden or Dot files

83
Q

To show hidden files with” ls “, use:

A

ls -a

84
Q

Command options can be combined

A

ls -l -a is the same as ls -la and ls -al

85
Q

What command reveals file types?

A

ls -F

86
Q

file types

A

/ - Directory
@ - Link
* - Execute

87
Q

A “ Symbolic Link “ can be used to :

A

Create a shortcut
For long file or directory names
to indicate the current version of software

88
Q

list files by time:

A

ls -t

89
Q

list files in reverse order:

A

ls -r

90
Q

long listing including files, in reversed order, and sorted by time:

A

ls -latr

91
Q

To list all recursively content in the current directory and all directories below that?

A

ls -R

92
Q

the Tree command is similar to ls -R, but creates visual output

A

tree -d list directories only
tree -C Colorize ouput

93
Q

this command lists the directory name but not the contents

A

ls -D

94
Q

to colorize output you would use the ____________ command

A

ls –color

95
Q

When creating file or directory names, do not use “Spaces” instead:

A

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
Q

permission “Execute or x “

A

File - Directory -
allows the execution of a file Allows access to contents and
metadata for entries

97
Q

permission categories

A
  • Symbol - - Category -
    u User
    g Group
    o Other
    a All
98
Q

this command displays a user’s groups

A

groups

99
Q

Change mode command

A

chmod

100
Q

user category: User, group, other, all

A

ugoa

101
Q

Add, subtract, or set permissions

A

+ - =

102
Q

permission layout

A

-rw-r–r–
first three are for the user
2nd three are for the users group
3rd three are for all others

103
Q

Permission order:U is always 1st, G is always 2nd and O is always 3rd

A

…………………….U G O
Symbolic rwx r-x r–
Binary 111 101 100
Decimal 7 5 4

104
Q

In general it’s not good to use these 2 permissions:

A

666 or 777

105
Q

to change the primary group of a file

A

chgrp

106
Q

to move a file or directory use this command:

A

mv

107
Q

This determines the default permissions

A

File creation mask

108
Q

If no mask were used, permissions would be:

A

777 for directories
666 for files

109
Q

the ______ sets the file creation mask to [mode], if given

A

umask command ex: umask [-S] [mode]
Use -S to for symbolic notation

110
Q

Special modes are:

A

setuid
setgid
sticky

111
Q

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

A

locate [Pattern] or command

112
Q

find command

A
  • Gets real-time results
  • good for advanced searches
113
Q

locate command

A
  • results may be a day old
  • good for simple searches
114
Q

displays the contents of a file

A

cat file

115
Q

browse through a text file

A

more file

116
Q

more features than more

A

less file

117
Q

Output the beginning (or top) portion of file

A

head file

118
Q

Output the ending (or bottom) portion of file

A

tail file

119
Q

by default Head and tail only displays 10 lines

A

change the behavior with -n
n=NUMBER OF LINES
tail -15 file.txt

120
Q

to view files in real time or as they are being written

A

tail -f file

121
Q

is a simple editor
Easy to learn
not advanced and vi or emacs
if it’s not available, look for pico

A

nano editor

122
Q

Using vi editor

A

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
Q

vi command mode and navigation

A

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
Q

vi insert mode

A

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
Q

vi line mode

A

: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
Q

VI has 3 modes:`

A

mode key
command esc
Insert iIaA (either of these)
Line :

127
Q

VI - repeating commands

A

Repeat a command by preceding it with a number:

5k = Move up a line 5 times
80i<text?<ESC> = Insert <text> 80 times
80i_<Esc> = Insert 80"_" characters</Esc></text></ESC>

128
Q

Vi - deleting text

A

x deletes a character
dw deletes a word
dd deletes a line
D Delete from the current position

129
Q

Vi - Changing text

A

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
Q

vi - Copying and Pasting

A

yy Yank (copy) the current line
y<position> Yank the <position>
p Paste the most recent deleted or yanked text</position></position>

131
Q

Vi - Undo/Redo

A

u undo
ctrl-r Redo

132
Q

Vi - Searching

A

/ <pattern> Starts a forward search
?<pattern> Starts a reverse search</pattern></pattern>

133
Q

vimtutor - will help you by walking through the command, like a tutorial / how to

A
134
Q

Emacs file editor

A

To edit a file: emacs < file name >