Chapter 1,2 - Installing Red Hat Enterprise Linux, Using Essential Tools Flashcards
What is Linux?
Linux is a free operating system. That means that the source code of all programs is available for free. However, some enterprise Linux distributions are sold as commercial products, with bundled support and maintenance, which is the case for RHEL 8
What are the two free alternatives to Redhat?
CentOS 8
Fedora
What is a Repository?
A repository is the installation source used for installing software. If you are using free software such as CentOS, correct repositories are automatically setup, and no further action is required. If you are using Red Hat Enterprise Linux with a subscription, you’ll need to use the Subscription Manager software to get
access to repositories.
What is the default file system RHEL 8 uses?
RHEL 8 by default uses the XFS file system. This file system cannot be shrunk; it can only be expanded. Therefore, it is sometimes a better choice to use Ext4.
What is a Shell?
The shell is the default working environment for a Linux administrator. It is the environment where users and administrators enter commands that are executed by
the operating system.
Which is the most common shell used?
Different shells for Linux are available, but Bash is the most common shell.
What are the 3 basic parts of a command?
the command, its options, and its arguments.
What are the 3 different kind of commands?
Aliases - An alias is a command that a user can define as needed
Internal Commands - An internal command is a command that is a part of the shell itself and, as such,
doesn’t have to be loaded from disk separately
External Commands - An external command is a command that exists as an executable file on the disk of the computer
Where are the external commands looked at when executed?
the $PATH variable.
To find out which exact command the shell is using and from where is it being loaded?
which command
What are the I/O redirection file descriptor numbers?
NAME - FILE DESCRIPTOR
STDIN - 0
STDOUT - 1
STDERR - 2
How do you redirect STDERR to the same destination as STDOUT?
2>&1
eg. ls whuhiu > errout 2>&1
What is a device file in Linux?
A device file on Linux is a file that is used to access specific hardware. eg.
HDD - /dev/sda, the console of your server is known as /dev/console or /dev/tty1
Which command to show a list of all commands in the Bash history?
history
How to execute a command with a specific number from history?
!number
How to execute the last command that starts with “sometext”?
!sometext
which command to clear the current history?
history -c
How to remove the complete Bash history?
type “history -w” immediately after using “history -c”
What are the vi or vim editor options?
vim Command = Explanation
/text = Searches for text from the current cursor position forward.
?text = Searches for text from the current cursor position backward.
^ = Goes to the first position in the current line.
$ = Goes to the last position in the current line.
!ls = Adds the output of ls (or any other command) in the current file.
:%s/old/new/g =Replaces all occurrences of old with new.
Which is the option to delete a line in vi or vim editor?
:dd
What does the environment configuration file “/etc/profile” contain?
This is the generic file that is processed by all users upon login
What does the environment configuration file “/etc/bashrc” contain?
This file is processed when subshells are started
What does the environment configuration file “~/.bash_profile” contain?
In this file, user-specific login shell variables can be defined
What does the environment configuration file “~/.bashrc” contain?
In this user-specific file, subshell variables can be defined
What is a login shell and what is a sub shell?
A login shell is the first shell that is opened for a user after the user has logged in. From the login shell, a user may run scripts, which will start a subshell of that
login shell.
what is the use of “/etc/motd” and “/etc/issue”?
Messages in /etc/motd display after a user has successfully logged in to a shell. Another way to send information to users is by using /etc/issue. The contents of this file display before the user logs in.
Which command to use to find information in man pages or search the man pages?
you can search the mandb database by using
“apropos” or “man -k”
What are the different categorizations of man pages?
1: Executable programs or shell commands
5: File formats and conventions
8: System administration commands
Which command to use to update the mandb database?
mandb