0% found this document useful (0 votes)
24 views10 pages

Simulado 06 - LPIC1 101 - EN-Version

This document contains questions and answers about Linux commands and concepts. It covers topics like filesystems, permissions, processes, users and groups, networking, and more. There are over 50 multiple choice questions testing one's knowledge of basic Linux administration tasks.

Uploaded by

fabriciomsc1983
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views10 pages

Simulado 06 - LPIC1 101 - EN-Version

This document contains questions and answers about Linux commands and concepts. It covers topics like filesystems, permissions, processes, users and groups, networking, and more. There are over 50 multiple choice questions testing one's knowledge of basic Linux administration tasks.

Uploaded by

fabriciomsc1983
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Simulado LX0-103/101-400

Question 1: Correct
From a Bash shell, which of the following commands directly executes the instruction from the file /us
r/local/bin/runme.sh without starting a subshell? (Please select TWO answers.)
R - . /usr/local/runmer.sh
R - source /usr/local/bin/runme.sh

Question 2: Correct
Regarding the command:
nice -5 /usr/bin/prog
Which of the following statements is correct?
R - ./usr/bin/prog is executed with a nice level of 5

Question 3: Correct
Which of the following commands can be used to determine how long the system has been running? (
Choose TWO correct answers.)
R - uptime
R - top

Question 4: Correct
Which of the following commands can be used to locate programs and their corresponding man
pages and configuration files?
R - whereis

Question 5: Correct
What is the first program that is usually started, at boot time, by the Linux kernel when using SysV init
?
R - /sbin/init

Question 6: Correct
In the vi editor, how can commands such as moving the cursor or copying lines into the buffer be issu
ed multiple times or applied to multiple rows?
R - By specifying the number rigth in of a command such as 4l or 2yj

Question 7: Correct
Which of the following commands moves and resumes in the background the last stopped shell job?
R - bg

Question 8: Correct
Which of the following commands shows the definition of a given shell command?
R - type

Question 9: Correct
Which of the following file permissions belong to a symbolic link?
R - lwrxwrxwrx

Question 10: Correct


Which of the following commands will change the quota for a specific user?
R - edquota
Question 11: Correct
Which of the following commands creates an ext3 filesystem on /dev/sdb1? (Choose TWO correct ans
wers.)
R - /sbin/mkfs -t ext3 /dev/sdb1
R - /sbin/mke2fs -j /dev/sdb1

Question 12: Correct


Which of the following commands lists all currently installed packages when using RPM package mana
gement?
R - rpm --query --all

Question 13: Correct


Which of the following commands set the sticky bit for the directory /tmp? (Choose TWO correct ans
wers.)
R - chmod +t /tmp
R - chmod 1775 /tmp

Question 14: Correct


Which shell command is used to continue background execution of a suspended command?
R - bg

Question 15: Correct


What is the maximum niceness value that a regular user can assign to a process with the nice comma
nd when executing a new process?
R - 19

Question 16: Correct


When using rpm --
verify to check files created during the installation of RPM packages, which of the following informatio
n is taken into consideration? (Choose THREE correct answers)
R - File Size
R - MD5 checksums
R - Timestamps

Question 17: Correct


Which of the following commands reboots the system when using SysV init? (Choose TWO correct ans
wers.)
R - shutdown -r now
R - telinit 6

Question 18: Correct


How many fields are in a syntactically correct line of /etc/fstab?
R-6

Question 19: Correct


In compliance with the FHS, in which of the directories are man pages found?
R - /usr/share/man

Question 20: Correct


Which of the following commands makes /bin/foo executable by everyone but writable only by its ow
ner?
R - chmod u=rwx, go=rx /bin/foo
Question 21: Correct
Which of the following commands will print the last 10 lines of a text file to the standard output?
R - tail -n 10 filename

Question 22: Correct


Which of the following commands prints all files and directories within the /tmp directory or its subdir
ectories which are also owned by the user root? (Choose TWO correct answers.)
R - find /tmp -user root -print
R - find /tmp -user root

Question 23: Correct


Instead of supplying an explicit device in /etc/fstab for mounting, what other options may be used to i
dentify the intended partition? (Choose TWO correct answers.)
R - UUID
R - LABEL

Question 24: Correct


What command will generate a list of user names from /etc/passwd along with their login
shell?
R - cut -d: -f 1,7 /etc/passwd

Question 25: Correct


A user accidentally created the subdirectory \dir in his home directory.
Which of the following commands will remove that directory?
R - rmdir ~/\\dir
Explanation
Veja que ~/ significa o /home do usuário. A primeira contra barra diz que a segunda será
tratada como digito normal, e não como file globbing.

Question 26: Correct


Which of the following is the device file name for the second partition on the only SCSI drive?
R - /dev/sda2

Question 27: Correct


After successfully creating a hard link called bar to the ordinary file foo, foo is deleted from the filesys
tem. Which of the following describes the resulting situation?
R - foo would be removed while bar would remain accessible.

Question 28: Correct


What is the difference between the i and a commands of the vi editor?
R - i (insert) inserts text before the current cursor position whereas a (append) inserts text
after the cursor.

Question 29: Correct


What information can the lspci command display about the system hardware? (Choose THREE correct
answers.)
R - Device IRQ Senttings
R - Device Vendor Identification
R - PCI bus speed
Question 30: Correct
Which of the following commands kills the process with the PID 123 but allows the process to "clean u
p" before exiting?
R - kill -TERM 123

Question 31: Correct


After running the command umount /mnt, the following error message is displayed:
umount: /mnt: device is busy.
What is a common reason for this message?
R - A user has a file open in the /mnt directory

Question 32: Correct


What happens after issuing the command vi without any additional parameters?
R - vi starts in command mode and opens a new empty file

Question 33: Correct


What is the default action of the split command on an input file?
R - It will break the file into new of 1000 line pieces each

Question 34: Correct


Which of the following commands replaces each occurrence of 'bob' in the file letter with 'Bob' and w
rites the result to the file newletter?
R - sed ‘s/bob/Bob/g’ letter > newletter

Question 35: Correct


Which of the following commands changes the number of days before the ext3 filesystem on
/dev/sda1 has to run through a full filesystem check while booting?
R - turne2fs -i 200 /dev/sda1

Question 36: Correct


Which file should be edited to select the network locations from which Debian installation package fil
es are loaded?
R - /etc/apt/sources.list

Question 37: Correct


Which of the following command sets the Bash variable named TEST with the content FOO?
R - TEST=”FOO”

Question 38: Correct


During a system boot cycle, what program is executed after the BIOS completes its tasks?
R - The bootloader

Question 39: Correct


What does the ? symbol within regular expressions represent?
R - Match the precending quanlifier zero or one time

Question 40: Correct


What do the permissions -rwSr-xr-x mean for a binary file when it is executed as a
command?
R - The execute flag is not set for the owner. Therefore the SetUID flag is ignored.

Question 41: Correct


What is the default nice level when a process is started using the nice command?
R-0

Question 42: Correct


Which SysV init configuration file should be modified to disable the ctrl-alt-delete key combination?
R - /etc/inttab

Question 43: Correct


Which type of filesystem is created by mkfs when it is executed with the block device name only and
without any additional parameters?
R - ext2

Question 44: Correct


Which of the following commands lists the dependencies of a given dpkg package?
R - apt-cache depends package

Question 45: Correct


Which of the following shell redirections will write standard output and standard error output to a file
named filename?
R - >filename 2>&1
Explanation
Lembre-se que precisamos o &, caso contrário um arquivo chamado “1” será criado.

Question 46: Correct


When removing a package, which of the following dpkg options will completely remove the files inclu
ding configuration files?
R - --purge

Question 47: Correct


Which of the following signals is sent to a process when the key combination CTRL+C is pressed on the
keyboard?
R - SIGINT

Question 48: Correct


Which variable defines the directories in which a Bash shell searches for executable commands?
R - PATH

Question 49: Correct


What does the command mount -a do?
R - It mounts all filesystems listed in /etc/fstab which have the option auto set.

Question 50: Correct


When starting a program with the nice command without any additional parameters, which nice level
is set for the resulting process?
R-0

Question 51: Correct


Immediately after deleting 3 lines of text in vi and moving the cursor to a different line, which single c
haracter command will insert the deleted content below the current line?
R - p (lowercase)
Question 52: Correct
Which of the following options for the kernel's command line changes the systemd boot
target to rescue.target instead of the default target?
R - system.d.unit=rescue.target

Question 53: Correct


Which of the following commands updates the linker cache of shared libraries?
R - ldconfig

Question 54: Correct


Which of the following settings for umask ensures that new files have the default
permissions -rw-r----- ?
R - 0027
Arquivos = 666-0640= 0026 -- 0027

Question 55: Correct


Which of the following commands will write a message to the terminals of all logged in
users?
R - wall

Question 56: Correct


Which of the following statements is correct regarding the command foo 1> bar?
R - The stdout from the command foo overwrites the file bar

Question 57: Correct


Which of the following commands changes the ownership of file.txt to the user dan and the group sta
ff?
R - chown dan:staff file.txt

Question 58: Correct


What does the command mount -a do?
R - Its ensures that all file systems listed with the option auto in /etc/fstab are mounted

Question 59: Correct


What of the following statements are true regarding /dev/ when using udev?
(Choose TWO correct answers.)
Entries for all possible devices get created on boot even if those devices are not connected.
R - Additional rules for udev can be created by adding them to /etc/udev/rules.d
R - The /dev/ directoty is a filesystem of type tmps and is mountend by udev during s y s t e m
startup
Explanation
Veja com o comando: $ df -hT /dev

Question 60: Correct


Which of the following kernel parameters instructs the kernel to suppress most boot
messages?
R - quiet

Question 61: Correct


After modifying GNU GRUB's configuration file, which command must be run for the
changesto take effect?
R - No Action is Required
Question 62: Correct
Which of the following commands will NOT update the modify timestamp on the file /tmp/myfile.txt?
R - file /tmp/myfile.txt

Question 63: Correct


What is the output of the following command?
R - Hll Wrld

Question 64: Correct


Which RPM command will output the name of the package which supplied the file
/etc/exports?
R - rpm -qf /etc/exports

Question 65: Correct


In a nested directory structure, which find command line option would be used to restrict the comma
nd to searching down a particular number of subdirectories?
R - maxdeph

Question 66: Correct


Which character, added to the end of a command, runs that command in the background as a child pr
ocess of the current shell?
R-&

Question 67: Correct


Which of the following commands will send output from the program myapp to both
standard output (stdout) and the file file1.log?
R - myapp | tee file1.log

Question 68: Correct


Which of the following are valid stream redirection operators within Bash? (Choose THREE correct ans
wers.)
R-<
R - <<<
R->

Question 69: Correct


Which of the following commands can be used to search for the executable file foo when it has been
placed in a directory not included in $PATH?
R - find

Question 70: Correct


After moving data to a new filesystem, how can the former path of the data be kept intact in order to
avoid reconfiguration of existing applications? (Choose TWO correct answers.)
R - By Mounting the new filesystem on the original path of the data
R - By Creating a symbolic link from the old to the new path of the data

Question 71: Correct


When running the command sed -e "s/a/b/" /tmp/file >/tmp/file
While /tmp/file contains data, why is /tmp/file empty afterwards?
R - When the shell establishes the redirection it overwrites the target file before the
redirected command starts and opens it for reading.
Question 72: Correct
Which of the following sequences in the vi editor saves the opened document and exits the editor? (C
hoose TWO correct answers.)
R - esc ZZ
R - esc :wq!

Question 73: Correct


Which of the following pieces of information of an existing file is changed when a hard link pointing to
that file is created?
R - Link Count

Question 74: Correct


Which of the following commands can be used to create a USB storage media from a disk
image?
R - dd

Question 75: Correct


Which of the following files, located in the user home directory, is used to store the Bash history?
R - .bash_history

Question 76: Correct


Which of the following commands determines the type of a file by using a definition database file whi
ch contains information about all common file types?
R - file

Question 77: Correct


What is the purpose of the Filesystem Hierarchy Standard?
R - It is a distribution neutral description of locations of files and direcries.

Question 78: Correct


Which of the following Linux filesystems preallocates a fixed number of inodes at the filesystem's
make/creation time and does NOT generate them as needed? (Choose TWO correct answers.)
R - ext2
R - ext3

Question 79: Correct


What is the effect of the egrep command when the -v option is used?
R - It only outputs non-matching lines

Question 80: Correct


Which of the following commands displays the contents of a gzip compressed tar archive?
R - tar tfz archive.tgz

Question 81: Correct


Which of the following commands is used to update the list of available packages when
using dpkg based package management?
R - apt-get update

Question 82: Correct


When given the following command line.
echo "foo bar" | tee bar | cat
Which of the following output is created?
R - foo bar

Question 83: Correct


Which of the following commands is used to change options and positional parameters for a running
Bash?
R - set

Question 84: Correct


Which of the following commands prints a list of usernames (first column) and their primary group
(fourth column) from the /etc/passwd file?
R - cut -d: -f 1,4 /etc/passwd

Question 85: Correct


In order to display all currently mounted filesystems, which of the following commands could be used
? (Choose TWO correct answers.)
R - mount
R - cat /proc/self/mounts

Question 86: Correct


Which of the following commands can be used to download the RPM package kernel without installin
g it
R - yumdownloader kernel

Question 87: Correct


Which of the following commands brings a system running SysV init into a state in which it
is safe to perform maintenance tasks? (Choose TWO correct answers.)
R - inti 1
R - telinit 1

Question 88: Correct


Which of the following are init systems used within Linux systems?
(Choose THREE correct answers.)
R - SysV init
R - Upstart
R - Systemd

Question 89: Correct


Which of the following is correct when talking about mount points?
R - Every existenting directory can be used as a mount point

Question 90: Correct


Creating a hard link to an ordinary file returns an error. What could be the reason for this?
R - The source and the target are on different filesystems

Question 91: Correct


Which of the following commands will reduce all consecutive spaces down to a single space?
R - tr -s ‘’ <a.txt>b.txt

Question 92: Correct


What is the purpose of the Bash built-in export command?
R - It sets up environment variables for applications
Question 93: Correct
Which of the following environment variables overrides or extends the list of directories holding share
d libraries?
R - LD_LIBRARY_PATH

Question 94: Correct


Which of the following characters can be combined with a separator string in order to read from the c
urrent input source until the separator string, which is on a separate line and without any trailing spac
es, is reached?
R - <<

Question 95: Correct


Which grep command will print only the lines that do not end with a / in the file foo?
R - grep -v ‘/$’ foo
Question 96: Correct
Which of the following commands can be used to display the inode number of a given file?
R - ls

Question 97: Correct


In Bash, inserting 1>&2 after a command redirects
R - standard output standard erro

Question 98: Correct


What can the Logical Volume Manager (LVM) be used for? (Choose THREE correct answers.)
R - To dynamically create or delete logical volumes
R - To dynamically change the size of logical volumes
R - To create snapshots

Question 99: Correct


Which utility would be used to change how often a filesystem check is performed on an ext2 filesyste
m without losing any data stored on that filesystem?
R - tune2fs

Question 100: Correct


Which of the following commands overwrites the bootloader located on /dev/sda without overwriting
the partition table or any data following it?
R - dd if=/dev/zero of=/dev/sda bs=440 count=1

Question 101: Correct


Which of the following options is used in a GRUB Legacy configuration file to define the amount of tim
e that the GRUB menu will be shown to the user?
R - timeout

Question 102: Correct


In the vi editor, which of the following commands will copy the current line into the
vi buffer?
R - yy

Question 103: Correct


Which of the following information is stored within the BIOS?
(Choose TWO correct answers.)
R - Boot device order
R - Hardware Configuration

You might also like