Topic2: Linux Installation and Package management Flashcards
Woodhaven Road
- Woodhaven Attic Shelves
cmd used to update the list of available packages when using dpkg based package management
apt-get update
- Attic Right Window
Top level system directory is used for files and data that change regularly while the system is running and are to be kept between reboots
/var/
3: Attic Middle Window
command updates the linker cache of shared libraries
ldconfig
4: Attic Shell Window
function key is used to start Safe Mode in WIndows NT
Windows NT does not support Safe Mode
5: Attic Middle Window
diff between –remove and –purge action with dpkg cmd
–remove removes the program –purge also removes the config files
6: Attic Organ
command will disable swapping on a device
swapoff
/sbin/swapoff
7: Attic Organ Bench
option to the yum command will update the entire system
update, upgrade
8: Attic Ledge behind Organ
What can Logical Volume Manager (LVM) be used for
dynamically change the size of logical volumes
create snapshots
dynamically create or delete logical volumes
9: Attic Ledge facing futon
When speaking about mount points
every existing directory can be used as a mount point.
10: Attic Futon
in which directory must definition files be placed to add additional repositories to yum
/etc/yum.repos.d/
11: Attic Side Window
Which of the following commands can be used to download RPM package kernel without installing it
yumdownloader kernel
12: Attic Hole in wall
command lists all currently installed packages when using RPM package management
rpm –query –all
13: Attic choo choo train
admin issued following cmd
grub-install –root-directory=/custom-grub /dev/sda
in which directory will new config files be found
/custom-grub/boot/grub
14: Attic Bathroom Sink
world-writeable directory should be placed on a separate partition in order to prevent users from being able to fill up / filesystem
/tmp
/var/tmp
15: Attic Bathroom Cabinet
what apt-get command will install the newest versions of all currently installed packages without removing any packages or installing new packages that are not already installed.
upgrade
16: Attic Bathroom Toilet
when removing a package when dpkg option will completely remove the files including configuration files
–purge
17: Attic Bathroom Shower
what command lists the dependencies of a given dpkg package
apt-cache depends package
18: Attic Ledge Facing Bathroom
main config file for GNU GRUB
menu.lst
grub.conf
grub.cfg
19: Attic Stairs
what file should be edited to select the network location from which Debian installation package files are loaded
/etc/apt/sources.list
20: Attic Door to Second Floor
Debian package management tool asks the config questions for a specific already installed package just as if the package were being installed for the first time.
dpkg-reconfigure
21: Second Floor Landing
cmd overwrites the bootloader located on /dev/sda without overwriting the partition table or any data following it
dd if=/dev/zero of=/dev/sda bs=440 count=1
22: Conor’s Closet
dpkg-_____ cmd will ask config questions for a specified package just as if the package were being installed for the first time
dpkg-reconfigure
23: Conor’s Bed
you want to preview where package file, apacke-xml.i386.rpm will install before installing it - what command do you issue
rpm -qpl apache-xml.i386.rpm
24: Conor’s Window
cmd can be used to perform a full text search on all available packages on a Debian system
apt-cache
25: Conor’s Mirrors
after modifying GNU GRUB’s config file which cmd must be run for changes to take effect
no action required.
26: Conor’s Dresser
option used in GRUB Legacy config file to define the amount of time that GRUB menu will be shown to the user
timeout
27: Conor’s Shelves
what environment variable will you assign or append a value if you need to tell the dynamic linker to look in a build directory for some of a program’s shared libraries
LD_LIBRARY_PATH
28: Conor’s Door
what RPM command will output the name of the package that supplied the file /etc/exports
rpm -qf /etc/exports
29: Landing Outside Conor’s Room
Which of the following environment variables overrides or extends the list of directories holding shared libraries
LD_LIBRARY_PATH
30: Mick’s Dresser
when using rpm –verify to check files created during the installation of RPM packages what is taken into consideration
Timestamps
MD5 checksums
File sizes
32: Michael’s Closet
effect of the egrep command when using the -v option
it only outputs non-matching lines
33: Michael’s Bed
in compliance with the FHS, in which directories are man pages found
/usr/share/man
34: Michael R Window
file in user home directory used to store Bash history
.bash_history
35: Michael Center Window
Bash env var defines in which file the user history is stored when the user history is stored when exiting a Bash process
HISTFILE
36: Michaels Toy Chest
user accidentally created subdirectory \dir in his home directory. Which of the following commands will remove the directory?
rmdir ~/\dir
37: Michael’s L Window
signal sent to a process when the key combination CTRL+C is pressed on the keyboard
SIGINT
38: Michael’s Beanbag #1
vi editor how can commands such as moving the cursor or copying lines into the buffer be issued multiple times or applied to multiple rows
by specifying the number right in front of a command such as 4l or 2yj.
39: Michael’s Beanbag #2
Which grep command will print only the lines that do not ed with a / in the file foo.
grep -v ‘/$’ foo
40: Michael’s Door
commands that can be used to determine how long the system has been running
uptime
top
41: landing outside Michael’s door
which characters can be combined with a separator string in order to read from the current input source until the separator string, that is on a separate line and without and trailing spaces is reached
«
42: Master Bedroom Chest of Drawers
cmd will NOT update the modify timestamp on the file /tmp/myfile.txt
file /tmp/myfile.txt
42: Master Bedroom Mirrors
which commands replace each occurrence of ‘bob’ in the file letter with ‘Bob’ and writes the result to the file newsletter
sed ‘s/bob/Bob/g’ letter > newsletter
43: Master Bedroom Ikea Dresser # 1
What does the + symbol mean in the following grep regular expression
grep ‘^d[aei]+d$’ /usr/share/dict/words
Match the preceeding character set ([aei]) one or more times
44: Master Bedroom Ikea Dresser # 2
vi editor which cmd will copy the current line into the vi buffer
yy
45: Master Bedroom Ikea Dresser # 3
In Bash, inserting 1>&2 after a cmd redirects
standard output to standard error
46: Master Bedroom L Window
what command can be used to create a USB storaage media from a disk image
dd
47: Master Bedroom L nightstand
which of the following commands prints all files and directories within the /tmp directory or its subdirectories that are also owned by the user root
find /tmp -user root -print
find /tmp -user root
48: Master Bedroom L Lamp
Command that determines the type of file by using a definition database file that contains information about all common file types
file
49: Master Bedroom Bed
default nice level when a process is started using the nice command
10
- Master bedroom r side table
editing in vi and file changed due to another process. without exiting vi how can the file be reopened for editing with the new content
:e
- R master master bedroom window
regarding nice -5 /usr/bin/prog what is the current nice level
5
- Master bedroom linen closet
cmd searches down a particular number of subdirectories
-maxdepth
- Master bathroom bathtub
max niceness level a regular user can assign to a process with the nice command when executing a new process
19
- Master bath skylight
vi editor save opened document and exits the editor
esc ZZ
esc :wq!
54, Master bath shower
what is true about cmd foo 1> bar
stdout from cmd foo overwrites file bar
- Master bath toilet
character added to end of a cmd runs that cmd in background as a child process of current shell
&
- Master bath sink # 1
valid reason to run a command in the background of your shell
cmd has to be run immediately but the user needs to log out
- Master bath Mirror # 1
purpose of bash built in export cmd
sets up env vars for apps
- Master bath Sink #2
cmd will print last 10 lines of a text file to standard output
tail -n 10 filename
- Master bath Mirror #2
commands is used to change options and positional parameters
set
- Master Closet Shelves
diff between i and a cmds in vi
i (insert) inserts text BEFORE the current cursor position
a (append) inserts text AFTER the cursor
- Master Closet Back Wall
cmd moves and resumes in background that last stopped shell job
bg
- Master Closet Clothing Rack
for sed -e “s/a/b” /tmp/file > /tmp/file why is the /tmp/file empty afterwards
When the shell establishes the redirection it OVERWRITES the target file before the redirected cmd starts and opens it for reading
- Master Bedroom Dresser
when starting a program with nice cmd without any additional params which nice level is set for the resulting process
10
- Master Bedroom Mirror
cmd prints a list of username (first column) and their primary group (fourth column) from the /etc/passwd file
cut -d : -f 1,4 /etc/passwd
- Master Bedroom Door
- Landing outside Master Bedroom
- 2nd Floor Bathroom sink
- 2nd Floor Bathroom Toilet
- 2nd Floor Bathroom Bath
- 2nd Floor Shower
- 2nd Floor Bathroom Door
- Landing Outside 2nd Floor Bathroom
74.