Linux Test 2 Q and A
Linux Test 2 Q and A
System Call
Q. What is a system Call
A. A system call is a request to the kernel in a UNIX operating system by an active
process performed by the kernel
Q. What is a process
A. A process is an executing instance of a program.
Q. What is an active process.
A. An active process is one that is currently advancing in the cpu
Q. What is Input/Output (I/O)
A. Input/Output is any program operation or device that transfers data from the cpu
to or from peripheral devices like keyboards and mice.
User Mode
Q. What type of mode is user mode.
A. User mode is a non-privileged mode
Q. What are processes running in non-privileged mode not able to access.
A. Processes in non-privileged mode are not able to access portion of ram (memory)
that has been allocated to the kernel.
Q. What must a user mode process do if it wants to access the services provided by
the kernel (system resources)
A. It must temporarily switch into kernel mode which has administrative privileges.
Q. What does the kernel do when is satisfies a request from a user mode process.
A. It restores the process to user mode.
Q. What is the standard procedure to switch from user mode to kernel mode called
A. 0x80 software interrupt.
Q. Which mode is the normal mode for operating for programs like web browser,
calculators etc.
A. User Mode
Q. How does code running in user mode access hardware or memory
A. They delegate to systems APIs (application program interface) and the kernel
takes care of the rest.
Q. What protection does running programs in user mode offer you. (related to
crashes)
A. Crashes are always recoverable.
Q. How many privilege levels does a UNIX OS require
A. At least 2 levels.
Overview
Q. What is a system Call
A. System Calls a special function that manage OS routines in the Kernel Mode
Q. What is the shell used for.
A. It is a program that interacts between the kernel and the user. It is a command
interpreter where a user can type commands and the command is conveyed to the
kernel to be executed.
Q. Name the 5 different types of shells
A. Sh (Simple Shell), BASH (Bourne Again Shell), KSH (Korne Shell), CSH (C Shell)
and SSH (Secure Shell)
Class 2 Instillation
Planning the Instillation
64 Bit Linux is the better option when it comes to Linux, 64 bit is significantly better
in almost any way. The only issue is some third party applications may not run on 64
bit.
Q. What are the two main types of installation interfaces available.
A. Textual (TUI/CLI) and Graphical (GUI)
Q. what is the difference between Textual and Graphical interfaces.
A. Textual is text only but is faster, while Graphical shows your desktop more like
windows does but is more resource intensive.
Q. What are the three main Linux distros what are the major differences.
A. Fedora, RHEL and Cent OS. Fedora is cutting edge and releases every 6 months
with only 13 months of support. RHEL is more stable proving 10 years of update,
this is sold through an annual subscription for support. CentOS has long term
stability as well and is compatible with RHEL but is not supported.
Q. What are the 3 standard install editions of Fedora, and what are there major
features.
A. Desktop Live Media, DVD/CD/USB/Image and Network Install. Desktop live media
does not need to install and runs from a live image, can be upgraded to a full install
if you have the internet. DVD/CD uses a media device to do a full install. A network
installer is similar to a DVD/CD install but downloads the software from a public
repository.
Q. Where must you save files on a Desktop Live Media version of fedora if you want
it to remain for the next boot?
A. It must be installed on the USB or a network drive.
Q. What are alternate installers on Fedora Called and what do they install.
A. The alternate installs are called spins and they install different UIs
Q. What is the name of the default partition in Linux
A. /root
Q. Where is the kernel stored in Linux
A. /boot
Q. What is the /swap partition used for
A. The /swap partition is used for virtual memory much like a page file. This space
can be used for system hibernation and for if physical memory is full.
Q. What is the users main drive called
A. /home
Chapter 3
Anaconda
Q. What is Anaconda
A. It is an OS installer
Q. What installation Model Does Anaconda Use
A. Hub-And Spoke
Q. How do you install Fedora from a live session (two answers)
A. Select Install to hard drive from either the activities list from the Welcome to
Fedora Window
Q. How do you install from an install image.
A. You boot the system with the install medium set as the boot drive.
Q. What do you do to modify parameters when installing.
A. Press the space bar and press tab on selected items to change the parameters
Q. What are some troubleshooting options for Fedora/RHEL
A. Install with basic graphics, Rescue the system (starts with a single user mode),
Run a memtest, boot from the local drive.
Q. What language is Anaconda Written in.
A. It is written in C and python
Q. What 3 options for disc configuration do you have with Anaconda Installer
A. You can allow Fedora to automatically configure the disks, You can configure the
disk partitions yourself or you can get help from the installer choosing partitions
based on your needs.
Q. What 4 partitions are created by default
A. /home /swap /boot and / (root)
Q. What command updates the system
A. $ Sudo Yum Update
Chapter 4
Q. What user has Super User privileges by default
A. Logging is a root gets you super user privilege.
Q. How can root, users that are members of the wheel and regular users gain Super
User access.
A. Root users are SU by default, Members of the wheel can gain SU by using their
own password. Regular user must know the root password to gain access to the SU
command.
Q. How do you access users that are not available in the login page but are on the
system.
A. You click on not listed ?
Q. Where do you choose what desktop session you wish to use.
A. You choose one after selecting the user you wish to log on as, it is in a drop down
menu.
Q. What is the standard desktop mode in Fedora.
A. Gnome 3 is the standard desktop in fedora.
Q. What keys allow you change the focus
A. Alt + Tab and Alt + Shift + Tab
Q. What command allows you to install the classical Desktop on Gnome 3 assuming
youre not root.
A. $ su -c yum install gnome-classic-session
Q. Define the following terms, Workspace, Active Workspace, Desktop, Panel and
Object
A. Workspace holds one or more applications in each window. An active workspace
is holds a workspace and is the current one. Desktop is the collection of all of the
workspaces, Panel hold the object, and object is a specific word icon or menu that
you can select.
Q. How do you copy and paste objects into the terminal.
A. You have to press Shift before ctrl+c or ctrl+v
Chapter 5 - Shell
Special Characters
Q. How can you generate white space in the shell
A. The return, space or tab key all generate white space
Q. There are special characters that the Shell interprets, how do you use them as
regular characters.
A. You have to put them inside of quotes.
Q. If you are going to put more than two special characters together what do you
have to precede with.
A. You have to use a \ (backslash)
Q. Define Ordinary and Directory Files
A. Ordinary files hold documents pictures programs etc. Directory Files contain
information about other files and directories.
Q. What is the working directory.
A. The working directory is the directory where a command that does not specify a
directory will look for a file other than an executable file.
Q. What is the default working directory when you login.
A. The working directory is set to /home when you login.
Q. What do the commands PWD- and CD- do?
A. PWD- shows the current working directory, CD- changes the working directory.
Q. Where are individual users working directory stored.
A. /home/<username>
Q. What is contained in the /home/<username> folder
A. It contains the users personalized configuration files and may also contain
documents, programs and mail folders.
Q. What needs to be done for arguments that have a hyphen.
A. It needs to be quoted.
Q. How does the Shell execute a command.
A. It looks for the command, checks the permissions and supplys the options and
arguments to the command. The results are printed to the screen.
TEST 2
Chapter 6 Hierarchical File System
Q, What is a hierarchical file system?
A. It is a set of data structures that reside on port of a disk and hold directories and
files.
Q. What are some directories that are no longer included
A. /Bin /sbin /lib instead they are symbolic links they are all in the /usr directory.
Q. What do 64 bit systems also have?
A. /lib64 usr/lib64
Q. What should you now use in your filenames.
A. Do not use spaces, many programs have issues with it.
Q. Is linux case sensetive?
A. Yes it is.
Q. Does linux OS care about file name extensions
A. No it does not
Q. Some programs however do require specific extensions list some
A. gcc needs .c .C .cpp .h .hpp
Q. Why are extensions generally used
A. Extensions are used to help useres identify file types.
Q. What denotes hidden directories
A. ( . ) as the first character denote hidden file directories.
Q. What are startup files and where are they located.
A. These are files used during the user login process. They are in each users home
directory.
Q. Absolute path names are what, and where are they located.
A. Absolute path name is the fully qualified name, always starts with the root (/)
Q. What is the ~ tilde used for
A.This symbol reprsesnts the users current home directory (/home/user). Generates
an absolute path name when expanded.
Q. What are relative pathnames
A. Relative pathnames are file or directory locations with respect to the current
working directory.
Q. What do you use to show relative directories and files.
A. You use . And .. yo show current directory and parent directory.
Examples curerent directory /home/zach
.mail = mail = /home/zach/mail
../his/notes = /home/his/notes
../../etc/profile = /etc/profile
Q. What does mkdir do?
A. Makes a directory
Q. What does cd do
A. Changes directory
Q. What does rmdir do
A. Deletes an empty directory, not available on all distrobutions
Q. what does rm do?
A. It removes a file us -R to recursivley delete a directory and any contents.
Q. What does mv do
A. mv moves a directory to another loaction or renames it.
Q. What does cp do?
A. CP copys files, use -r to copy a directory and its contents
Q. What is in var files
A. Files that change as the system is running. Examples are log files and mail
queues.
CHAPTER 7
A. who -m
Q. What does whoami display
A. It shows the current users username.
Q. What do the commands which and where is do?
A. Whci hproduces a list of all programs with a specified name in the path directory,
where is searches for files in the path directory as well as some other standard
locations.
Q. What does locate do?
A. It looks for specifed files in the local system using an index, use $update
periodically to keep the index updated.