1/262
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
what is unix?
a collection of related operating systems
what are the two major divisions of unix?
BSD & SysV/SVR4
what kind of operating system is UNIX typically?
command line only
what is the structure of a UNIX command?
command -flags operand
what is the superuser account in UNIX?
root
what is the file and command that controls who can run programs as root
/etc/sudoers; visudo
T/F: is it possible to create a root equivalent account?
false
how does one interact with the system?
via the command line parser
what are some things the command line parser can do?
manage processes, manage files
what are the two ways commands can be entered?
manually and via shell scripting
login shell
program that provides the user's command line prompt when they log into the system
where is the login shell specified?
/etc/passwd
where are the startup scripts the login shell generally stored?
user's home directory
interactive shell
a non-login shell into which the user enters commands
non-interactive shell
usually contains a script and inherits environment variables from the parent shell
C shell (csh)
/bin/csh; uses C language syntax for scripting
Korn shell (ksh)
/bin/ksh; introduced command line history and tab completion
BASH
/bin/bash; standard scripting shell for most Linux distributions
what is everything managed as in UNIX?
a file under a single filesystem (root "/")
what is the only hard mount point in UNIX?
the root "/"
/bin directory
executable files requied for basic operations
/dev directory
placeholders for devices
/etc directory
configuration information and files
/sbin directory
system binaries
/lost+found directory
where lost files are put
/proc directory
holds the placeholders for running processes
/usr directory
contains installed applications used by all users
/home directory
contains the home directories for each user
/var directory
contains log files, spooling, and cache
/tmp directory
hold temporary files
what must happen before any filesystem (including CD-ROM) can be used?
it must be mounted to the root filesystem
mount point
directory used as an anchor point or place holder
where must filesystems be mounted over?
an existing directory/mount point
what is the command to mount a filesystem
mount
what is the command to unmount a filesystem
umount
what is the file that contains a list of all the filesystems to automatically mount?
/etc/fstab
what are the two partitions that every UNIX installation requires?
/ and swap
what is done during the installation filesystem configuration?
configuring disks for access, defining volumes, creating partitions and assigning filesystem to partitions
what partition should always be created separately?
/var
ls command
list the files characteristics and information
mv command
move a file or rename a file
rm command
remove a file
-f flag
force; prevents the system from asking confirmation before deleting
-r flag
recursive; affects all underlying files and directories
what are the three owners of every file/directory, in what order?
user, group, everyone
what is the command to view ownership?
ls -l
what is the command the change the user or group ownership?
chown
what is the command that will only change the group ownership?
chgrp
what are the three basic permissions?
read (4), write (2), execute (1)
what is the command to change file permissions?
chmod
what is the SUID bit?
a file always executes as the file's owner; value of 4, lower 's' when set and has read perm, upper 'S' when set and does not have read perm
what is the SGID bit?
any files will be executed as the owning group; any files created in the directory will have group ownership set to the parent directory's group; value of 2
what is the sticky bit?
only the owner/root of a file/directory can delete or rename the file; value of 1
link
a pointer to another file or directory
symbolic/soft links
a pointer to another file, if deleted the target remins
hard link
a direct link between the file, once the last reference to the inode is deleted, the file is no longer accessible
what link can cross the file system?
soft link
what link can link between directories?
soft link
what link has different inode number and file permissions?
soft link
what link will not have its permissions updated?
soft link
what link only contains the path of the original ifle?
soft link
what link cannot cross the file system boundaries?
hard link
what link cannot link between directories?
hard link
what link has the same inode number and permissions?
hard link
what link will have its permissions updated?
hard link
what link has the actual contents of the original file?
hard link
pipe ("|")
sends the output of a program as the input for another program
redirect (">")
redirect the output of a program to something other than stdout
grep command
used to search for a string; can use on file or whatever is piped into it
grep command structure (file)
grep
grap command structure (pipe)
find command
used to find files
find command structure
find
dircmp command
compares directories
ps command
lists all currently running processes
ps command structure
ps -aux OR ps aux
kill command
used to kill a currently running process
-9 flag
terminate with extreme prejudice
kill command structure
kill -9
command to reboot machine
shutdown -r now
command to halt/shutdown machine
shutdown -h 5
what are the two basic approaches to distributing UNIX software?
compile from source and pre-compiled packages
what are the steps to configure from source code?
./configure; make; make install
why compile from source code?
most flexible and will work on most UNIX distributions and hardware platforms, but have to deal with dependancies manually
why install software using packages?
automatic updates and don't have to worry about dependancies
what is a tarball
a file that contains multiple files; UNIX equivalent of a ZIP file
what is usually also done to tarballs?
compressed with gzip or bzip
what is the command to expand a tarball
tar -xvf
what is the command to expand a compressed tarball?
tar -zxvf
what is the ports collection?
automate downloading and compiling source code and handles dependencies, common on BSD, middleground between packages and compiling from source
where is hardware support done?
in the kernel
how does one add support for new hardware?
add to the kernel and recompile
what are the benefits of modular kernels
dynamically link new kernel modules to the kernel at run-time; faster, simpler, reduces system instability, more security issues
commands for interacting with kernel
depmod, modprobe, insmod
building kernel process
installer kernel sources/compilers, modify system config, build new kernel, install and test new kernel
UNIX startup process
BIOS -> boot device > boot loader > kernel > init/systemd
boot loader task
loads kernel into memory
kernel task
initialize hardware and modules
init/systemd task
check file system integrity, mount disks, initialize network and network daemons
fsck command
check the integrity of file systems