Professional Documents
Culture Documents
a)/swap
b)/etc/swap
c) /usr/bin
d) /usr/sbin
e) it can’t be accessed
A. e) it can’t be accessed. If the system needs more resources, inactive
pages of your memory are moved to the swap partition to free up
more memory to work with, and there is no _/_ because it can’t be
accessed by the user like a normal file system.
102.Partitions Q.What is LVM
A.Logical Volume Manager, split disk into pools and then combine
those pools in partitions. Can grow and shrink partitions.
102.Partitions Q.What is a Boot loader? Example of boot loaders?
A. Enables you to boot a Linux system. It runs before the operating
system but can be configure also from the operating system.
A boot loader, also called a boot manager, is a small program that
places the operating system (OS) of a computer into memory. When a
computer is powered-up or restarted, the basic input/output system
(BIOS) performs some initial tests, and then transfers control to
the master boot record (MBR or uses UEFi system) where the boot
loader resides.
One of the first boot loaders was called LILO which stands for
Linux loader, and the GRUB (Grand Unified Bootloader) from the GNU
Project which has 2 versions: Grub Legacy and Grub 2 (the latest
release).
102.GRUB Q. Where can grub directory can be found?
a) /boot
b) /etc/boot
c) /bin
d) /home
A. Because it is the boot loader it can be found in /boot (a)
102.GRUB Q. What is the main configuration file for Grub?
a) grub.cfg for most recent version of Grub and menu.lst or
grub.conf for older versions
b) grub.lst
c) grub.conf for recent versions and grub.conf for older versions
d) menu.lst for recent versions and grub.conf or grub.cfg for
older versions
A. a)this info is written on the beginning of the config file (from the
previuos question)
102.GRUB Q.What option need to be changed to be able to modify
the time until the OP starts at the beginning of the booting system, in
the default config file? The default param is set to 2 sec.
a)GRUB_DEFAULT
b) GRUB_TIMEOUT
c)GRUB_CMDLINE_LINUX_DEFAULT
d)GRUB_CMDLINE_LINUX
A. b) GRUB_TIMEOUT in /etc/default/grub
102.GRUB Q.What we need to run after updating the config file
(default config file found in /etc/default/) for Grub, for the
changes to take effect.
a) update the new setting with _update-grub_ command
d) just saving the file before exit and the new settings are taken into
consideration
b) right shift
c) delete
A. a)
102.GRUB Q. How can you see the GRUB version?
a) grub-version -V or grub-V
b) grub-check –version(-V)
A. d)
102.Libraries Q. Where are the locations of shared libraries stored
on your file system, how the Ubuntu keeps track of them?
a) /etc/ld.so.conf
b) /var/ld.so.conf
c) /etc/ldd/ld.so.conf
d) /usr/ldd
A. a)in /etc/ld.so.conf it is included /etc/ld.so.conf.d that
has all the libraries. But there is just info about them not the real files
of the lib.
For example: in Ubuntu Desktop in /etc/ld.so.conf.d we have
libc.conf and x86_64-linux-gnu.conf and if we open further
libc.conf ( standard C library ) we find out that the real file is in
/usr/local/lib, and there we find the python.
In centos we have mariaDB (instead of libc.conf) and other cpu
architecture lib .
The question may mislead, and it is important to understand the
difference between the real file(library) and the way the system is
aware of it.
102.Libraries Q. How to add a shared library to the dynamic linker?
A. Make the configuration file and place it in the /etc/ld.so.conf.d
directories with other configuration files. Then in that file
include the libraries you want from /home/usr/bin. After that is
very important to update the Dynamic linker with ldconfig
command for the changes to take effect.
B. Another way is to use environmental variables. We can use a
temporary variables that will no longer exists at logout.
Export LD_LIBRARY_PATH=my file path
To query the shell and see what the path is set to
echo $LD_LIBRARY_PATH.
102.Dependecies
Q. Find out which are the dependencies for ls app?
A)
step1) run which ls to find out where this app is located
step2) run ldd _path_ to the app discovered at the previous step
ldd = list all dependecies
b) dpkg -i
c) dkgp -i
d) dkpk -i
b)dpkg -i
manager
102. Package managers Q. What command needs to be run to be able
to remove an installed package.
a) dpkg --del filename
b) apt-get update
c) apt-get dist-upgrade
d) apt-get dist-update
a)apt-get update if we use apt-get dist-upgrade it will take care also the
dependencies.
102.Package managers Q. What does the apt-get remove
filename command?
a) removes the app, but keeps the configuration file and all the
dependencies that needs to be removed in another step.
b) removes the app, configuration file and also the dependencies
installed
c) removes the app and the configuration file but keeps the
dependencies
d) removes the app and the dependencies but keeps the configuration
file.
a) Removes only the app. The configuration needs to be removed
with sudo dbpk –purge filename and the dependencies
with sudo apt-get autoremove.
102. P.Man Q.What command needs to be run to see the
dependencies of apache2?
a) apt-cache apache2 | less