1/160
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No study sessions yet.
What is the command to set permissions for a file1.c using octal form with owner having all permissions, group having read and execute, and world having nothing?
sudo chmod 750 file1.c
Why is stdin a softlink?
Where does the stdin softlink point?
/proc/self/fd/0
What is the command to create a softlink?
ln -s filename softlink_name
Which directory is the window into the hardware world?
/dev
What is a virtual machine?
software that emulates a computer system with its own virtual cpu, network interface, and storage in the user space in the existing OS as an independent process
What is the hypervisor?
the virtual machine manager (ex: UTM)
Where does a virtual machine run?
on top of the host operating system
What does AT&T stand for?
American Telephone and Telegraph
What does DARPA stand for?
defense advanced research projects agency
In which system did open source movement start?
GNU
What does GNU stand for?
GNU not Unix
Who created Linux?
Linus Torvalds
What does GPL stand for?
general public license
What is copyleft?
if you make a derivative work from something open source, it can't have a stricter license than the original
Where was Linus Torvalds from?
Finland
What is a distribution of Linux?
the kernel and packages
What family is Ubuntu in?
debian
Who created Ubuntu?
Mark Shuttleworth
What is the naming convention of Ubuntu versions?
year and month of release (ex: 24.04 = April 2024)
How many versions of Ubuntu are released a year?
two
What months are the two versions of Ubuntu released?
April and October
What release of Ubuntu has long term support every year?
April version
What is open source?
basically when the code is available to everyone so they can modify, play with, and create their own version of it
What does BIOS stand for?
basic input output system
What is BIOS?
firmware that initializes hardware on the motherboard
What does BIOS do?
gets system ready to load and run the OS
What is a hardware partition?
a logical division of hard drive
What is the naming convention of sata drive partitions?
ex: sda2, first drive, second partition
Outline the Boot process.
1. the system powers up, BIOS does hardware init
2. boot loader calls kernel
3. kernel loads initial RAM disk that loads system drives and finds root file system
4. after kernel is set, systemd init system starts
5. systemd takes over to mount host's file system and starts services
What is the name of the kernel?
vmlinuz
What does the master boot record (MBR) contain?
a table with the boot loader and partition table
Who came up with UEFI?
Intel
What does UEFI stand for?
unified extensible firmware interface
What are the password stages?
1. BIOS password
2. hard drive password
3. user password
What does GRUB stand for?
grand unified boot loader
What are the three init systems?
sysVinit, Upstart, and systemd
What are daemons?
kernel background processes that start autonomously after booting
What kinds of PIDs do daemons have?
low numbers, ex: systemd = PID 1
How can you check how long each service takes to start?
system-analyze
What are the three types of users?
root, sudoers, standard
What can each group of users do?
root = anything, standard = certain privileges (PLP), sudoer = standard user that was explicitly given permission to do something
What is the Principle of Least Privilege (PLP)?
when you give a user the least amount of privilege possible for them to complete the things they need to be able to do
What does pwd do?
print working directory
What does ls -l do?
shows everything in your directory in long list format (shows pid, parent, etc)
What does ls * do?
pattern seeking, anything you put after the , your system will pull up (ex: ls .c pulls up all .c files)
What is a process?
an instance of a computer program
What is the PCB?
process control block, data structure in the kernel with the information needed to schedule the process
What memory allocations does a process have?
data, instructions, stack, heap
What does the stack hold for a process?
function activation
What does the heap hold for a process?
dynamically allocated entities
What directory are processes in?
/proc
What is in the boot directory?
kernel (vmlinuz)
What is the first process created?
What is the process with PID 0?
the scheduler
Why can't we see PID 0 in the system?
What is the process with PID 1?
systemd
What does systemd do?
adopts ophans, reaps zombies, handles signals for children
How do processes create other processes? Is there a command?
fork()
What is an orphan process?
created when a parent dies, normally adopted by systemd
What is a zombie process?
created when a child doesn't wait() for it's parent (process has been completed but still remains in process table due to lack of correspondence between parent and child)
What does top show?
processes in real time
What does ps show?
a snapshot of processes at that moment
What does pstree show?
a snapshot that displays processes in a tree format
What does pgrap do?
returns matching PID for process
Where does a child get its niceness (priority)?
from its parent (set with nice and adjust with renice)
What is a runaway process?
a process that consumes more resources than expected
Are daemons orphans?
yes, intentionally
What does cron do?
runs commands on a schedule
What does anacron do?
runs skipped processes as soon as system boots up
What is a filesystem?
a way to organize and store files
What filesystem does our version of Linux use?
ext4
What are the most common filesystems?
Fat32, NTFS, HtS+, Btrfs, Swap FS
What did ext3 introduce?
journaling!
What is journaling?
when the system writes data to another part of the hard drive and notes the necessary changes to a log incase of a power failure or something that would cause inconsistencies
What are the three journaling levels?
jornal, ordered, writeback
Why does Linux support so many different filesystems?
because it was made to be flexible and customizable
What kinds of items live in a filesystem?
files, directories, and devices
What are the two kinds of devices?
block devices and character devices
What is a character device?
communicates with driver through stream of characters
What is a block device?
communicates with driver through fixed size blocks of data
How do you know if a device is a block or character device?
first character on the permissions string
What are the two forms of permissions?
octal and mnemonic
What are octal permissions?
the numerical way of setting permissions (ex: chmod 740 --> gives user all, group read, and other none)
What are mnemonic permissions?
the alphabetical way of changing permissions (ex: chmod u=rwx, g=r, o= filename --> gives user all, group read, and other none)
What is umass?
user mask, the default permissions for the files and directories you create (subtract from 777 or 666)
How do you see what your umass is?
command "umass"
How do you change/set your umass?
"umass number"
What is in /bin?
binaries, executables
What is in /boot?
grub, kernal image (vmlinuz)
What is in /dev?
files associated with device drivers, stdin, stdout, stderr
What is in /etc?
config files, passwd, shadow, group, sudoers, etc.
What's in /home?
holders for every user in the system
What's in /mnt?
mount point (mounting an external filesystem to yours, hiding existing files if you mount over it)
What is in /opt?
third party software (ex: zoom)
What's in /sbin?
super user binaries
What's in /usr?
everything a user might need to do their work
What's in /var?
files that vary in size like log files
What are inodes?
index nodes that are assigned by kernel when a file is created
What command displays inodes for you to see in a directory?
ls -i