101-350 - LPI Level 1 Exam 101, Junior Level Linux Certification, Part 1 of 2
Go back to
LPI
Example Questions
Which of the following Linux filesystems pre-allocates a fixed number of inodes at the filesystem's make/creation time, and does NOT generate them as needed?
ext3
What effect does the sticky bit have when set on a directory?
It restricts deletion of files in this directory to only the root user and the file owner regardless of write permissions for other users.
Which of the following is true when hard-linked files are present?
Both files will share the same inode
Which of the following commands will print the inode usage on each mounted filesystem?
df -i
What command line redirection characters instruct the shell to read from the current input source until a specific word, on a separate line and without any trailing spaces, is reached?
<<
You are experimenting with a binary in /tmp/foo.d that expects its configuration file at /etc/foo.conf. You don't want to save it there, but use a symbolic link to /tmp/foo.d/foo.conf instead. Which command would accomplish that?
ln -s /tmp/foo.d/foo.conf /etc/foo.conf
You are having some trouble with a disk partition and you need to do maintenance on this partition but your users home directories are on it and several are logged in. Which command would disconnect the users and allow you to safely execute maintenance tasks?
telinit 1
Which shell command is used to continue background execution of a suspended command?
bg
During a system boot cycle, what is the program that is run after the BIOS completes its tasks?
The bootloader
Instead of supplying an explicit device in /etc/fstab for mounting, what other options may be used to identify the intended partition? (Select TWO correct answers)
LABEL
UUID
Which of the following commands can be used to perform a full text search on all available packages on a Debian system?
apt-cache
When should grep -F or the fgrep command be used to search the content of text files?
When the text being searched for does not contain any regular expression patterns.
Which of the following sed commands will replace all instances of the string foo with the string foobar changing the file file1.txt in place?
sed -i 's/foo/foobar/g' file1.txt
Which of the following commands will write a message to the terminals of all logged in users?
wall
What is the purpose of the xargs command?
It will read standard input and build up commands lines to execute.
Which of the following commands is run last during boot on a system with quotas enabled?
quotaon
Which of the following commands will load a kernel module along with any required dependency modules?
modprobe
Select the line that best represents what permissions the /etc/passwd file should have.
-rw-r--r-- 1 root root 531 Jun 5 22:45 /etc/passwd
What is the default action of the split command on an input file?
It will break the file into new files of 1,000 line pieces each.
In bash, inserting 2>&1 after a command redirects
standard error to standard output.
What is the purpose of the Bash built-in export command?
To automate the export of variables for subsequently executed commands.
While editing a file in vi, the file changes due to another process. Without exiting vi, how can the file be reopened for editing with the new content?
:e
Which chown command will change the ownership to dave and the group to staff on a file named data.txt?
chowndave:staff data.txt
Which utility would you use to change how often a filesystem check is performed on an EXT2 filesystem (without losing any data stored on that filesystem)?
tune2fs
To 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
Which of the following commands will print the amount of disk space used by files specified on the command line?
du
What is the effect on the grep command when the -v option is used?
It inverts the matching to select non-matching lines.
Which of the following commands can be used to locate programs and their corresponding man pages and configuration files?
whereis
Which of the following commands can be used to create a new file that is 100kB in size?
dd
You want to preview where the package file, apache-xml.i386.rpm, will install its files before installing it. What command do you issue?
rpm -qpl apache-xml.i386.rpm
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 parameter line.
In compliance with the FHS, in which of the directories are man pages typically found?
usr/share/man
Which configuration file should be modified to disable the ctrl-alt-delete key combination?
etc/inittab
Given the following output: prompt>myapp [1]+ Stoppedmyapp prompt> Which of the following commands will resume executing the stopped process and make it the current job?
fgmyapp
Which vi command will change modes so that text can be entered by typing in the keyboard?
i
Identify the proper device for the second partition on the only SCSI drive on the system.
dev/sda2
In the command foo < bar | foobar, which ONE of the following statements is correct?
The command foobar receives its stdin from the stdout of foo.
Which of the following explanations are valid reasons to run a command in the background of your shell?
The command has to run immediately but the user needs to log out.
You have created a long letter and after you are done you notice that you used the name "Bob" many times but you forgot to capitalize it in many instances. Which command would replace "bob" with "Bob" in all instances and generate a new letter for printing?
sed 's/bob/Bob/g' letter >newletter
What is the difference between the --remove and the --purge action with the dpkg command?
--remove removes the program, --purge also removes the config files
Which signal is sent to a suspended process in order to have it resume execution?
CONT
Bob accidentally created the subdirectory \bobsdir in his home directory. He tried to remove the subdirectory with the command rmdir \bobsdir only to receive the error, "No such file or directory." . Which command will remove the directory?
rmdir ~bob/\\bobsdir
Which of the following commands will print the first few lines of a text file to the shell?
head -n 10 filename
What does the ?symbol mean in the following grep regular expression: grep '^d[aei]\?d$' /usr/share/dict/words
Match the preceding character set ([aei]) zero or one times.
In order to use the output of ls to overwrite a file called bazz, which of the following command lines would you use?
ls>bazz
Which of the following commands enables the setuid (suid) permission on the executable called /bin/foo?
chmod 4755 /bin/foo
Which command can be used to display the inode number of a given file?
ls
What does the command mount -a do?
It mounts all file systems listed in /etc/fstab.
What command will uninstall a package but leave its configuration files in case a package is re- installed?
dpkg -r pkgname
Which signal is sent by the kill command by default?
TERM(15)