Ramdom Flashcards
What type of file system is created by mkfs when it is executed with the block device name only and withouth any additional params
ext2
What of the following statements are true regarding /dev/ when using udev?
Additional rules for udev can be created by adding them to /etc/udev/rules.d/
The /dev/ directory is stored in /etc/udev/dev and is restored during system startup.
The system is having trouble and the engineer wants to bypass the usual /sbin/init start up and run /bin/sh. What is the usual way to pass this change to the kernel from your boot loader
Pass init=/bin/sh on the kernel param line.
Which umask value ensures that new directories can be read, written and listed by their owning user, read and listed by their owning group and are not accessible at all for everyone else?
0027
What command changes the number of days before the ext3 filesystem on /dev/sda1 has to run through a full filesystem check while booting?
tune2fs -i 200 /dev/sda1
Command converts spaces in a file to tab characters and prints the result to standard output
unexpand
which utility would be used to change how oftten a filesystem check is performed on an ext2 filesystem without losing any data stored on that filesystem
tune2fs
what is the default percentage of reserved space for the root user on a new ext4 filesystem
5%
What happens when a file system that is not listed in /etc/fstab nor known to the system is manually mounted
the command systemctl mountsync can be used to create a mount unit based on the existing mount
What is true about mount points
Every existing directory can be used as a mount point.
Kernel parameter that instructs the kernel to suppress most boot messages
quiet
FILL BLANK -
Which program updates the database that is used by the locate command? (Specify ONLY the command without any path or parameters).
updatedb
What does the command mount –bind do?
It makes the contents of one directory available in another directory
Consider following output
525385 -rw-rw-r– 2 1000 1000 0 Feb 12 19:44 a.txt
526255 lrwxrwxrwx 1 1000 1000 5 Feb 12 19:44 b.txt -> a.txt
How would a new file named c.txt be created with the same inode number as a.txt (Inode 525385)?
ln a.txt c.txt
what commands will display all currently mounted filesystems
cat /proc/self/mounts
mount
Command can perform full text search on all available packages on debian system
apt-cache
updates linker cache of shared libraries
ldconfig
Consider the following directory:
drwxrwxr-x 2 root sales 4096 Jan 1 15:21 sales
Which command ensures new files created within the directory sales are owned by the group sales? (Choose two.)
chgrp -p sales sales
chmod 2775 sales
FILL BLANK -
Which command displays the current disk space usage for all mounted file systems? (Specify ONLY the command without any path or parameters.)
df
Which chown command changes the ownership to dave and the group to staff on a file named data.txt?
chown dave:staff data.txt
When considering the use of hard links, what are valid reasons not to use hard links?
Hard links are specific to one filesystem and cannot point to files on another filesystem
hard links are not availabel on all Linux systems because traditional filesystems, such as ext4, do not suport them
In compliance with the FHS in what directory are man pages found?
/usr/share/man
FILL BLANK -
Which file in the /proc filesystem lists parameters passed from the bootloader to the kernel? (Specify the file name only without any path.)
cmdline
/proc/cmdline
What is the process ID number of the init process on a SysV init based system?
1
Which daemon handles power management events on a Linux system?
acpid
what information is stored in the BIOS
Boot device order
Hardware configuration
Which of the following statements are true about the boot sequence of a PC using a BIOS? (Choose two.)
Some parts of the boot process can be configured from the BIOS
The BIOS initiates the boot process after turning the computer on
During a system boot cycle, what program is executed after the BIOS completes its tasks?
The bootloader
What is true regarding UEFI firmware?
It can use and read certain file systems
It is stored in a special area within the GPT metadata
A faulty kernel module is causing issues with a network interface card. Which of the following actions ensures that this module is not loaded automatically when the system boots?
Adding a blacklist line including the name of the offending module to the file /etc/modprobe.d/blacklist.conf
When is the content of the kernel ring buffer reset?
When the ring buffer is explicitly reset using the command dmesg –clear
When the system is shut down or rebooted
which command displays the contents of the Kernel Ring Buffer on the command line?
provide only the command name without any options or path information.
dmesg
/bin/dmesg
What commands reboot the system with using SysV init
shutdown -r now
telinit 6
What is the first program the Linux kernel starts at boot time when using System V init?
/sbin/init
A Debian package creates several files during its installation. What command searches for packages owning the file /etc/debian_version?
dpkg -S /etc/debian_version
how is symbolic link called bar.conf pointing to foo.conf created
ln -s foo.conf bar.conf
What is contained on the EFI System Partition?
The first stage boot loader
directories on a 64 bit Linux system typically contain shared libraries?
~/.lib64/
/lib64/
What is the name of the main config file for GUN GRUB
menu.lst
grub.cfg
grub.conf
files exist in a standard GRUB 2 installation?
/boot/grub/i386-pc/lvm.mod
/boot/grub/grub.cfg
commands installs all packages with a name ending with the string foo?
zypper install “*foo”
updates already installed RPM package rpmname
rpm -U rpmname
You want to preview where the package file, apache-xml.i386.rpm, will install its files before installing it what commnd do you issue
rpm -qpl apache-xml.i386.rpm
properties of a Linux system should be changed when a virtual machine is cloned?
The permissions of /root/
The SSH host keys
what does the command grub-install /dev/sda do
installs all required files and configures the boot loader on device/dev/sda
partition types is used for Linux swap spaces when partitioning hard disk drives?
82
What is true regarding the configuration of yum?
The configuration of package repositories can be divided into multiple files
in case /etc/yum.repos.d/ contains files, /etc/yum.comf is ignored
Repository configurations can include variables such as $basearch or $releasever
Which Debian package management tool asks the configuration questions for a specific already installed package just as if the package were being installed the first time
dpkg-reconfigure
After moving data to a new filesystem, how can the former pat of the data be kept intact in order to avoid reconfig of existing apps
by creating symbolic link from old to the new path of data
by mounting the new filesystem on the original path of the data.
Command used to update the list of available packages when using dpkg based package management
apt-get update
apt-get subcommands installs the newest versions of all currently installed packages?
dist-upgrade
apt-get command will install the newest versions of all currently installed packages without removing any packages or installing new packages that are already installed.
upgrade
uninstalls a package but keeps its configuration files in case the package is re-installed?
dpkg -r pkgname
In which directory must definition files be placed to add additional repositories to yum
/etc/yum.repos.d
lists the dependencies of the RPM package file foo.rpm?
rpm -qpR foo.rpm
What is the maximum niceness value that a regular user can assign to a process with the nice command when executing a new process?
19
list all files and directories within the /tmp/ directory and its subdirectories which are owned by the user root?
find /tmp -user root -print
find -path /tmp -user root - print
valid stream redirection operators within Bash?
<
«<
>
vi commands deletes two lines, the current and the following line?
2dd
The command dbmaint & was used to run dbmaint in the background. However, dbmaint is terminated after logging out of the system. Which alternative dbmaint invocation lets dbmaint continue to run even when the user running the program logs out?unning the program logs out?
bg dbmaint
From a Bash shell, which of the following commands directly execute the instructions from the file /usr/local/bin/runme.sh without starting a subshell?
source /usr/local/bin/runme.sh
. /usr/local/bin/runme.sh
FILL BLANK -
Which program runs a command in specific intervals and refreshes the display of the program’s output? (Specify ONLY the command without any path or parameters.)
watch
Immediately after deleting 3 lines of text in vi and moving the cursor to a different line, which single character command will insert the deleted content below the current line?
p (lowercase)
Which of the following commands changes all CR-LF line breaks in the text file userlist.txt to Linux standard LF line breaks and stores the result in newlist.txt?
tr -d ‘\r’ < userlist.txt > newlist.txt
txt1.txt
atxt.txt
txtB.txt
What expression turns this input stream into the following output stream? txt1.bak.txt atxt.bak.txt txtB.bak.txt
s/txt/bak.txt/
What is correct about /proc/
All changes to files in /proc/ are immediately recognized by the kernel.
command must be entered before exiting vi to save the current file as filea.txt?
:w filea.txt
following signals is sent to a process when the key combination Ctrl+C is pressed on the keyboard?
SIGINT
command displays the output of the foo command on the screen and also writes it to a file called /tmp/foodata?
foo | tee /tmp/foodata
What output will be displayed when the user fred executes the following command? echo ˜fred $USER
fred fred
Which of the following commands displays the path to the executable file that would be executed when the command foo is invoked?
lsattr foo
When redirecting the output of find to the xargs command, what option to find is useful if the filenames contain spaces?
-print0
changes quota for specific user
edquota
Which top leve system directory is used for files and data that change regularly while the system is running and are to be kept between reboots
/var
commands can be used to determine how long the system has been running
uptime
top
What is true regarding the command
ls > files
if files does not exist?
files is created and contains the output of ls
Which of the following files, located in a user home directory, contains the Bash history?
.bash_history