Linux Study Notes Flashcards
What is the first Unix Shell?
Bourne Shell
Also referred to as “The Shell”
Who created the first Unix Shell?
Stephen R. Bourne
What are the three types of Unix Shells?
Login Shell, Interactive Shell, Non-Interactive Shell
What is a Login shell?
The shell that is run when you log in to a system, either via the terminal or via SSH.
What is an Interactive shell?
A shell that actively reads commands from user input
What is a Non-Interactive shell?
A shell that cannot interact with the user. it’s most often run from a script or similar.
This means that .bashrc and .profile are not executed.
Init and startup scripts are necessarily non-interactive, since they must run without human intervention.
What is a KERNEL?
This is the software that acts as the brain in Linux. It controls the hardware, which is then able to interact with applications.
What is a process?
A process is any active (running) instance of a program.
What is a boot loader?
A program that boots the operation system.
examples of boot loader are GRUB and ISOLINUX.
What is CLI?
Command Line Interface
an interface for typing commmands on top of an OS.
What is the DAEMON?
A Linux/UNIX program that runs in the background.
What is a Systemcall?
The fundamental interface between an application and the Linux kernel (OS).
What is a File System?
A method for storing and organizing files in Linux.
What are the READ and WRITE interface numbers for a Systemcall?
Read = 0 Write = 1
What Systemcall gets time of day?
Syscall 96
gettimeofday
Gets the system time in seconds since 12:00 AM Jan. 1, 1970
What is the Systemcall 99?
sysinfo
gets information about memory usage and CPU load average
What processes are at the “least-privileged” level?
User processes (when a program is executed in User Mode, it cannot directly access the kernel data structures or the kernel programs)
Describe the Kernel Mode.
The Kernel mode is the privileged mode where the process has unrestricted access to the system resources like hardware, memory, etc.
The Kernel itself is not a process but a PROCESS MANAGER.
(True or False)
System Calls are the only way through which a process can go into kernel mode from user mode.
TRUE
What are the 2 types of device drivers and what do they do?
Kernel-mode Device Drivers and User-mode Device Drivers.
Device drivers let the OS know how to access and use information from that device. They act as a translator between a device and the app or OS that uses it.
What does the Kernel-Mode Device Driver include?
This includes generic hardware that loads the BIOS, motherboard and processor.
It also includes the minimum system requirement device drivers for each OS.
What is an aka for User-Mode Device Driver and give example.
aka: user space driver
Example: USB driver which handles the different devices connected through a USB port. If problems, the task can be killed.
What are the common device drivers?
Character, Block, Network and USB Drivers
What command lists all PCI buses in the system along with the devices connected to them?
lspci
- n (shows device code as numbers)
- k (kernel drivers @device & modules)
- v (description all devices)
System call and signals can be traced by utilizing what command?
strace ls
Also know as Modules, what is built into the base kernel and were created to allow users to add code to the Linux Kernel while it is running?
LKM or Loadable Kernel Modules
What interprets the contents of a file system and can be added to a LKM?
File System Drivers
(True or False)
A majority of the system calls are built into the Kernel, but a user can invent a system call of their own and install it as an LKM.
TRUE
What driver interprets a network protocol?
Network drivers
What loads and runs an executable?
Executable Interpreters
What command will show the status of currently loaded LKMs?
lsmod
In Linux, and executable stored on a disk is called what?
a Program
A program loaded into memory and running is called what?
A PROCESS
what does PID and PPID stand for?
PID - Process ID
PPID - Parent Process ID
When a process is started, it is given a unique number called what?
Process ID
PID & PPID
What assigns the unique PID?
the Kernel
Files in what directory are executed first, then the files in the home directory follow?
the /etc directory
What command lets us see what login shell the user is currently operating in?
echo $0
use echo $SHELL to show what type of shell you’re in