Unix OS Flashcards
Components of Linux
Kernel
libraries
utilities
UI/CLI
Linux boot sequence
BIOS -> GRUB -> Kernel -> init -> runlevel
MBP
Master Boot Record is normally located in /dev/hda or /dev/sda
GRUB
Grand unified boot loader
if you want multiple installed on your system you can choose which to execute.
Location /boot/grub/grub.conf which link to /etc/grub.conf
what does kernel do in the boot sequence
mounts root files system in grub.conf
executes /sbin/init
what does initrd stand for.
initial Ram Disk
is used by kernel as temporary root file system until kernel is booted and real root file system is mounted.
What is init and its levels.
initialization of the OS. /etc/inittab file decides whip run level.
0 halt 1 single user mode 2 multimuser, without NFS 3 full multiuser mode with command line 4 unused 5 full multiuser mode with GUI/X11 6 reboot
most machines boot in 3 or 5
What is run level
Depending on the level the init system would execute a program from one of the directories supporting that level.
/etc/rf.d/rc[level#].d/
Program that start with a S mean what in the run level directory
start up
Program that start with a K mean what in the run level
directory
shutdown
What are the linux directories
bin boot dev etc home lib lost+found media mnt opt proc root sbin src srv tmp usr var
How many directories are then in linux
18
What is directory bin?
contains the system binary files that are essential for general operation of your computer. ex cp ls
What is directory boot?
contains only the files that are absolutely necessary to get ta basic linux system up and going. this only contains grub in formation
What is directory dev?
where are devices are located.
What is directory etc?
this is the config folder for your entire OS. Almost everything about he configuration is stored here.
These files are static and text based
What is directory home?
is where you store your user specific documentation and setting.
What is directory lib?
contains system library binaries that re required to run the system.
uses .so for these similar to windows dll.
What is directory media?
used to store removable media only.
What is directory mnt?
this is where you want to mount drives. temporary
What is directory opt?
is reserved for additional software you install. most people don’t use this director.
What is directory sbin?
these are binaries that are reserved for root users. they typically will only work when executed by root or sudo.
What is directory src?
used for plug and play configuration
What is directory tmp?
is a temporary storage folder.
What is directory usr?
houses all the binaries documentation libraries and header files for all the user applications. most usr binaries would be installed in to his folder.
What is directory var?
this stores all the files that vary as a the system runs. like log files backups mail cache
What is directory root ?
is the home directory for the root user.
What is directory proc?
is a virtual directory that contains process information. it contains runtime system info like system memory device mounted , hardware configuration
What is directory lost+found?
if your file system crash and the linux file system checker fsck recovers corrupt files they are placed here
What is directory srv?
it holds site specific data to be served by the system for protocols.
What is the most common file system used
*ext family
What is a inode
is a data structure that all the information about a file expect its name and data
what is a symbolic link
a point to another file
ln -s source.file softlink
what is a hard link
a copy of a file
wheel group
has special system privileges such as su -.
What does “|” mean in linux command line?
used to take output from one command to another
What does “;” mean in linux command line?
used for sequential commands the previous commands has to complete
What does “&” mean in linux command line?
used to run a command in the background
What does “()” mean in linux command line?
could be sued to expand a command before the outside commands runs
What does the reverse of this do: “>” mean in linux command line?
directs contents of a file to a command
What does “>” mean in linux command line?
directs the stand output to a command or file
What does “2>” mean in linux command line?
directs standard error to a file
What does “&>” mean in linux command line?
directs standard out and stand error to a file
What does “»” mean in linux command line?
direct both output of command to a file adding it to the end
What does “{}” mean in linux command line?
Expands out a set of characters.
ex Touch memo{1,2,3} would create memo1 memo2 memo3
What does “*” mean in linux command line?
matches any character
What does “?” mean in linux command line?
matches only one character
What does “[…]” mean in linux command line?
matches anything within the bracket.