Study Flashcards
four freedoms defined by the FSF
- freedom to use the software for any purpose
- freedom to examine the source code and modify it as you see fit
- freedom to redistribute the software
- freedom to redistribute your modified software
/
root; all files and subdirectories are in this directory
/etc
system configuration files
/boot
boot files such as Linux kernel, initial RAM disk, and often boot loader configuration files
/bin
program files that are critical for normal operation and that ordinary users may run
/sbin
holds program files that are critical for normal operation and that ordinary users seldom run
/lib
holds libraries that are critical for basic system operations
/usr
holds programs and data used in normal system operation but that are not critical for a bare bones boot of the system
/var
holds miscellaneous transient files, such as log files and print spool files
/tmp
holds temporary files, often including temporary files created by user programs
/mnt
the traditional mount point for removable media; sometimes split into subdirectories for each mounted filesystem
/media
the new mount point for removable media
/dev
holds devices files, which provide low level access to hardware
/run
information about the running system
ls -a
displays dot (usually configuration) files that would normally be omitted
ls –color
produces color coded listing that differentiates directories and other special file types by displaying them in different colors
ls -d
changes the behavior of ls to list only the directory name
ls -l
produces a long listing that includes information such as file’s permission string, owner, group, size, and creation date
ls -F
appends an indicator code to the end of each name so that you know what type of file it is
ls -R
causes ls to display directory contents recursively
tool used to view kernel messages
dmesg
command that shows a list of running programs
ps
command that shows an interactive live display of processes
top
command that shows free memory
free
display Linux system information
uname -a
display kernel release information
uname -r
command to show which version of Red Hat is installed
cat /etc/redhat-release
show how long the system has been running + load
uptime
show system host name
host
display all local IP addresses of the host
hostname -I
show system reboot history
last reboot
show this month’s calendar
cal
display who is online and their running programs
w
show who you are logged in as
whoami
feature of Linux where the kernel gives CPU time to any process as it sees fit, which could interrupt other processes
preemptive multitasking
what is Evolution?
an email reader program commonly used in desktop environments
kernel design that incorporates all kernel functions into a single program
monolithic
kernel design that splits kernel functions into smaller programs
micro kernel
software used by Linux to implement SMB/CIFS (file and printer sharing)
Samba
command that moves the cursor to the start of the line in Bash terminal
Ctrl + A
how do you run a program in the background?
add a & at the end of the command line, or launch program, press Ctrl + Z, then type “bg” in the shell
improved version of more with page backward in text file, search, etc)
less
keys to open the terminal in GUI
Ctrl + Alt + F3
keyboard shortcut that allows copying highlighted text while working in the command line terminal
Ctrl + Shift + C
command used as a virtual or pseudo filesystem used to interface with the kernel and process
/proc
what would properly identify the device associated with the second partition on the first hard disk on the first IDE controller of a system?
/dev/hda2
What is defined by a Free Software license?
conditions for modifying and distributing the licensed software
displays messages in kernel ring buffer
dmesg
displays CPU information
cat /proc/cpuinfo
displays memory information
cat /proc/meminfo
display free and used memory (human readable)
free -h
display PCI devices
lspci -tv
display USB devices
lsusb -tv
display DMI/SMBIOS (hardware info) from the BIOS
dmidecode
device name for a physical or virtual terminal connection
tty
a suite of client-server software for creating and using file hosting services
OwnCloud
searches the short manual page descriptions for keywords and displays any matches
man -k
command used to clear the user’s history
history -c
command used to create a new .tar archive file
tar -c
command used to print the last X bytes of a file to the screen
tail -c
command used to find the IP address of a particular domain name or the domain name of a particular IP address, DNS lookups
host
set on a file or a directory that lets only the owner of the file/directory or the root user delete or rename the file.
sticky bit
command that displays processor related statistics
mpstat 1
command that displays virtual memory statistics
vmstat 1
command that displays I/O statistics
iostat 1
command that lists all open files on the system
lsof
LibreOffice equivalent of Microsoft PowerPoint
Impress
a free and open-source file compression program that uses the Burrows-Wheeler block sorting text compression algorithm and Huffman coding. It only compresses single files and is not a file archiver
bzip2
command that is used to change the default permission for files and directories at the time of the file’s creation
umask
output of the who command
includes username, terminal identifier, login date and time. displays list of users currently logged in
a pre-integrated self-contained system made by combining a software application with just enough operation system to run optimally on industry standard hardware or a virtual machine
virtual appliance
command to rename a file or directory
mv
command to see all variables in the user’s environment
printenv
what symbol at the end of a prompt shows that the user has root privileges?
#
tar command that shows .tar file progress during execution
tar -v
command to list, test, or extract files from a zip archive
unzip
feature of linux where you can represent multiple file names by using wild cards
globbing
command to show the shell that is being used
echo $SHELL
in which files should you look to diagnose problems with the daemon?
log files
command to display the exit code of the last command executed from the shell
echo $?
what is GTK+?
a GUI programming library
command used to very quickly search a database of file names that is updated every 24 hours
locate
2 possible reasons to partition a hard drive
- install 2 operating systems
- separating file system data from swap space
what type of current power electricity does computer hardware require to operate?
direct current
what are two currently popular X software packages in Linux?
X.org
Wayland
which type of links do not work across low-level file systems?
hard links
tar command to read the archive and display its contents
tar -t or –list
command that can extract specified data fields from a file’s records
cut
what does [^x} do?
finds any single character EXCEPT x
linux normally runs one of these two processes first
init or systemd
vi command to save and exit vi editor
ZZ
three keys/key combinations to start a search and replace in nano
ESC+R, Ctrl+\, F4
two keystrokes that invoke search function in nano
F6, Ctrl+W
what variable contains the name of the script?
$0
output of id command
username, UID, primary group name, primary GID number, group names and GID numbers of all your groups
command to change a user password
passwd
command to change a file’s group
chown
true or false: only root can use the chmod command
false
true or false: only root can change a file’s ownership with chown
true
command that provides an interactive text menu for selecting a network interface and setting network parameters
nmtui
command that displays features and parameters for network cards
ethtool
command that displays a list of open ports and processes associated with those ports
ss
what are three programs for compressing individual files?
gzip, bzip2, xz
what individual file compression program offers the most compression?
xz
what are the three individual file uncompression programs?
gunzip, bunzip2, unxz
tar option to create archive
tar -c
tar option to append tar files to an archive
tar -A
tar option to append non-tar files to an archive
tar -r
tar option to append files that are newer than those in an archive
tar -u
tar option that compares an archive to files on disk
tar -d
tar option that lists and archive’s contents
tar -t
tar option that extracts files from an archive
tar -x
syntax for creating a zip archive
zip newzip.zip file1.txt file2.tif
zip option to compress an entire directory tree
zip -r
what do zip options -0 through -9 do?
set the amount of control, 9 being the highest and slowest
zip option to view contents of an archive without extracting
zip -l
what command should you used to locate a command used in a script if the file gets moved and the path in the script breaks?
which
program that provides many capabilities of a text edit through commands typed in the command line or run in the script
sed
when do you omit the $ in front of the variable name?
when values are being assigned to variables in the script with an =
what is the syntax for an if statement that does not use brackets?
if test condition
«
accepts text on following lines as standard input
<>
both standard input and standard output
&>
create new file with both standard output and standard error
2»
append standard error to existing file
> >
append standard output to existing file
.*
matches with any substring
?
optional match; can be zero or one match
(used in regular expression)
separates two possible matches
output of wc
number of lines, words, and bytes in a text file
command to extract text from files in a file record; often to extract variable info from a highly patterned file
cut
keystrokes to save a modified file in nano
Ctrl+O or Ctrl+X
keystrokes to insert a file in nano
Ctrl + R or F5
keystrokes to search for a string in nano
Crtl+W or F6
keystrokes to replace a string in nano
Ctrl+\ or M-R
what are the three vi modes?
command, ex, insert
key to enter insert mode in vi
I
key to enter ex mode in vi
:
command to save changes without exiting vi
:w
command to save and quit vi
:wq
command that saves modifications in command mode in vi
ZZ
command to view a process listing as a snapshot, generally sorted by PID
ps
command used for DNS lookup; finds IP address of a particular domain name or domain name of an IP address
host
shows info about a directory or symbolic link
ls -d
what echo command is used to not output a trailing new line?
echo -n
what command prints the last 10 lines and continues to print more as data is added?
tail -f
what command is used to remove a directory that contains files/subdirectories?
rm -r (rmdir is only for empty directories)
file descriptor number of standard input
0
where are temporary files to be safely deleted on reboot stored?
/tmp
what are the three ways DHCP can be used to assign IP addresses?
Automatic, Dynamic, Manual
what can you add to add the date to a prompt in the shell?
/d