Examen de certificacion LPIC - 101

Description

Quiz on Examen de certificacion LPIC - 101, created by Carlos Alberto Jara Alva on 28/06/2022.
Carlos Alberto Jara Alva
Quiz by Carlos Alberto Jara Alva, updated more than 1 year ago
Carlos Alberto Jara Alva
Created by Carlos Alberto Jara Alva about 2 years ago
115
0

Resource summary

Question 1

Question
What kind of hardware is represented by the device name /dev/hda?
Answer
  • IDE Hard Drive
  • SCSI Hard Drive
  • SATA Hard Drive
  • Sound Card

Question 2

Question
What file should you query to determine whether there is an IRQ conflict on your system?
Answer
  • /proc/interrupts
  • /proc/cpuinfo
  • /proc/meminfo
  • /proc/irqstatus

Question 3

Question
Which of the following are arguments you can pass to the kernel at boot time to tell it to start in runlevel 1 (single-user mode)? (Select two)
Answer
  • 1
  • single
  • user
  • one

Question 4

Question
Which process is referred to as the “mother of all processes” and always has PID 1?
Answer
  • init
  • mother
  • admin
  • administrator

Question 5

Question
Which logfile should you examine for information about the hardware that the kernel initialized at boot time?
Answer
  • /var/log/messages
  • /var/log/lastlog
  • /var/log/wtmp
  • /var/log/cron

Question 6

Question
If you want to change your system’s default boot device from the hard drive to the CD-ROM drive, where would you make that configuration change?
Answer
  • The BIOS
  • The file /boot/grub/grub.conf
  • The file /etc/inittab
  • The file /etcgrub/grub.conf

Question 7

Question
What command line would reboot a running Linux system immediately, forcing an fsck of every drive on reboot?
Answer
  • /sbin/shutdown –r –F now
  • /sbin/shutdown –h –F now
  • /sbin/shutdown
  • /sbin/shutdown –r –f now

Question 8

Question
Which of the following are valid ways to interactively switch a running system to runlevel 3? (Select two)
Answer
  • init 3
  • telinit 3
  • runlevel 3
  • init -3

Question 9

Question
If you have created your own script that you wish to run every time your system boots, but it must run after all other processes have completed, where is the best place to reference it?
Answer
  • /etc/inittab
  • /etc/rc.d/rc.sysinit
  • A symlink beginning with S in /etc/rc.d/rc5.d/
  • /etc/rc.d/rc.local

Question 10

Question
Which command is used to display the current mounted partitions, their mount points, and the available free space on each?
Answer
  • df
  • fdisk
  • fsck
  • mount

Question 11

Question
Which partition is designed to hold data that changes often and is writable by all users?
Answer
  • /tmp
  • /opt
  • /sys
  • /var

Question 12

Question
What does MBR stand for?
Answer
  • Master Boot Record
  • Main Booting Runlevel
  • Main Block Record
  • Master Boot Resource

Question 13

Question
Which of the following lines in /boot/grub/grub.conf would tell GRUB to use the first partition of the first hard drive as the root partition?
Answer
  • root (hd0,0)
  • boot (hd0,0)
  • root (hd1,1)
  • boot (hd1,1)

Question 14

Question
What file contains a list of directories that are searched to find shared libraries when a binary program is executed?
Answer
  • /etc/ld.so.conf
  • /etc/loader.conf
  • /etc/library/conf
  • /etc/ld.so.cache

Question 15

Question
For distributions that use the Debian package management system, what command will download and update all installed packages to the latest available version?
Answer
  • apt-get update
  • apt-get install
  • apt-cache update
  • dpkg –i

Question 16

Question
If I download a .deb package (package.deb) and wish to install it, what’s the best command to use?
Answer
  • dpkg –i package.deb
  • apt-get install package.deb
  • apt install package.deb
  • dpkg package.deb

Question 17

Question
For distributions that use the Red Hat package management system, what command will list all packages currently installed?
Answer
  • rpm –qa
  • rpm –i
  • rpm –Uvh
  • rpm –list

Question 18

Question
For distributions that use the Red Hat package management system, what command will download and update all installed packages to the latest available version?
Answer
  • yum update
  • yum install
  • yum config
  • yum list available

Question 19

Question
What option(s) to rpm will instruct rpm to run a verification check on all packages installed on the system? (Select two)
Answer
  • rpm –verify –all
  • rpm –Va
  • rpm –qa
  • rpm –check

Question 20

Question
What command is used to display a list of directories the shell will search in to find a command that has been entered?
Answer
  • echo $PATH
  • echo $MYPATH
  • setenv
  • set $PATH

Question 21

Question
Which file(s) does the bash shell read at login to set environment variables?
Answer
  • All of the above
  • /etc/bashrc
  • ~/.bashrc
  • None of the above

Question 22

Question
What commands can be used to view a list of the last commands typed into the shell?
Answer
  • All of the above
  • history
  • <Ctrl-R>
  • <up arrow>

Question 23

Question
If my current directory is /opt and I wish to run the command /opt/runme, what command(s) could I type (assuming /opt is not in your $PATH)? (select two)
Answer
  • /opt/runme
  • /runme
  • opt/runme
  • ~/runme

Question 24

Question
Which of the following commands will redirect the standard output of /bin/ls to /dev/null, while allowing standard error to display on the screen?
Answer
  • /bin/ls 1> /dev/null
  • /bin/ls > /dev/null
  • /bin/ls > /dev/null 2>&1
  • /bin/ls 2> /dev/null 1>&2

Question 25

Question
Which of the following command(s) will display the first 5 lines of the file /etc/passwd? (Select two)
Answer
  • head -5 /etc/passwd
  • cat /etc/passwd | head -5
  • cat -5 /etc/passwd
  • cat /etc/passwd | more -5

Question 26

Question
Which commands can be used to perform a search and replace on a file or a text stream? (Select two)
Answer
  • sed
  • tr
  • dd
  • mv

Question 27

Question
What command(s) can be used to copy data to and from raw devices, bypassing the filesystem? (Select two)
Answer
  • tar
  • dd
  • mv
  • sed

Question 28

Question
What option can be passed to /bin/ls to display every file in a directory that ends in .txt?
Answer
  • ls * txt
  • ls *txt*
  • ls [txt]
  • ls +.txt

Question 29

Question
What option can be passed to /bin/ls to display every file that starts with the letters a, b, or c?
Answer
  • ls [abc]*
  • ls abc*
  • ls a*b*c*
  • ls ^abc

Question 30

Question
Which file extensions are common for files or directories that have been concatenated with tar and then compressed with bzip2?
Answer
  • All of the above
  • .tar.bz2
  • .tbz2
  • .tbz

Question 31

Question
What device should you redirect output to if you do not want to see it or save it?
Answer
  • /dev/null
  • /dev/nothing
  • /dev/empty
  • /dev/zero

Question 32

Question
Which of the following commands would list the contents of the directory /tmp, store that list in the file /root/tmp.txt, and display the list a screen at a time?
Answer
  • ls –l /tmp | tee /root/tmp.txt | more
  • ls –l /tmp | xargs /root/tmp.txt | more
  • ls –l /tmp | more | tee /root/tmp.txt
  • tee /root/tmp.txt | ls –l /tmp | more

Question 33

Question
What character is used after a command line to indicate that the command should run in the background and return shell control to the user?
Answer
  • &
  • *
  • +
  • -

Question 34

Question
What command is used at the beginning of a command line to detach the process from a terminal, allowing it to continue running after the user has logged out?
Answer
  • nohup
  • hangup
  • detach
  • background

Question 35

Question
What command will display a full-screen, updated list of all running processes?
Answer
  • top
  • kill
  • ps
  • free

Question 36

Question
If a running process is not responding to a standard terminate signal from the /bin/kill command, what option can you pass to force the process to terminate immediately?
Answer
  • kill -9
  • kill -1
  • kill --HUP
  • kill --stop

Question 37

Question
What command can be used to kill processes by name, rather than process ID?
Answer
  • killall
  • killproc
  • killname
  • kill –name

Question 38

Question
Which command line would start the program /usr/bin/top with the highest priority possible?
Answer
  • nice --20 /usr/bin/top
  • nice 20 /usr/bin/top
  • nice 19 /usr/bin/top
  • nice -20 /usr/bin/top

Question 39

Question
Which command is used to modify the priority of a process already running?
Answer
  • renice
  • priority
  • chage
  • ps

Question 40

Question
Which command(s) would display every line in /tmp/file.txt that begins with the letter h and ends with the letter t?
Answer
  • grep –E "^h.*t$" /tmp/file.txt
  • grep "^h.+t$" /tmp/file.txt
  • grep –E "^h.+t$" /tmp/file.txt
  • grep –E "$h.+t^" /tmp/file.txt

Question 41

Question
Which command(s) would display every line in /tmp/file.txt that contains at least one letter of the alphabet? (Select Two)
Answer
  • grep " [a-zA-Z] " /tmp/file.txt
  • grep " [:alpha:] " /tmp/file.txt
  • grep " [:letters:] " /tmp/file.txt
  • grep " (a-zA-Z) " /tmp/file.txt

Question 42

Question
In the vi editor, what command sequence given in command mode will save the current file and quit the editor?
Answer
  • :wq
  • :WQ
  • :pq
  • None of the above

Question 43

Question
In the vi editor, what command sequence given in command mode will make a copy of the current line?
Answer
  • yyp
  • cp
  • yp
  • ccp

Question 44

Question
In the vi editor, what command sequence given in command mode will quit a file without saving, even if changes have been made?
Answer
  • :q!
  • :q
  • :q1
  • :w!

Question 45

Question
Which of the following are examples of journaling filesystems? (Select two)
Answer
  • ext3
  • reiserfs
  • xfs
  • ext2

Question 46

Question
What command will create an ext3 partition on the first partition of the first SCSI hard drive?
Answer
  • mkfs –t ext3 /dev/sda1
  • fdisk –t ext3 /dev/sda1
  • fsck –t ext3 /dev/sda1
  • mkfs –s ext3 /dev/hda1

Question 47

Question
What command is used to convert an existing ext2 partition (/dev/sda1) to an ext3 (journaled) partition?
Answer
  • tune2fs –j /dev/sda1
  • dumpe2fs –j /dev/sda1
  • fsck –j /dev/sda1
  • mkfs.ext2 –j /dev/sda1

Question 48

Question
What command is used to display the number of free inodes on an ext2 or ext3 partition?
Answer
  • dumpe2fs
  • showe2fs
  • fsck
  • fdisk

Question 49

Question
Which file defines what partitions are mounted at boot time?
Answer
  • /etc/fstab
  • /etc/partitions
  • /etc/mount
  • /etc/mtab

Question 50

Question
Which command will mount all partitions of type nfs defined in /etc/fstab?
Answer
  • mount –a –t nfs
  • mount –a nfs –t
  • mount –nfs
  • mountall –nfs

Question 51

Question
If you would like to give a normal (nonroot) user the ability to mount a device, what option should you define for that device in /etc/fstab?
Answer
  • user
  • mountable
  • noroot
  • ok

Question 52

Question
Which option to chmod would assign read/write permission to the file owner, read-only permission to the group owner, and read-only permission to everyone else?
Answer
  • chmod 644 file.txt
  • chmod 755 file.txt
  • chmod 466 file.txt
  • chmod 777 file.txt

Question 53

Question
Which option to umask would set my default file permissions such that files are created with these permissions: user has read/write, group has read/write, and everyone else has read only?
Answer
  • umask 022
  • umask 200
  • umask 220
  • umask 775

Question 54

Question
Which command can be used to quickly tell you if an executable command is in any directory defined in your $PATH environment variable?
Answer
  • which
  • find
  • locate
  • who

Question 55

Question
Which directory, according to the Filesystem Hierarchy Standard, is designed to hold essential system binaries?
Answer
  • /sbin
  • /bin
  • /usr/bin
  • /opt/bin

Question 56

Question
According to the Filesystem Hierarchy Standard, what directory (or directories) must hold the system kernel? (Select Two)
Answer
  • /boot
  • /
  • /opt
  • /sbin

Question 57

Question
What command is used to maintain the filesystem index that the command /usr/bin/locate searches?
Answer
  • updatedb
  • update
  • updatelocate
  • locate –update

Question 58

Question
Use find to search for bash:
Answer
  • $ find / -name bash
  • $ find / -linux bash
  • $ find / -time bash
  • $ find / -chown bash

Question 59

Question
If you created a new partition in the previous exercises, check it with fsck and observe the output:
Answer
  • $ fsck -f /dev/partition
  • $ fsck -f /bin/partition
  • $ fsck -f /sbin/partition
  • $ fsck -f /dev/null

Question 60

Question
Check on the status of filesystems using df:
Answer
  • $ df -h
  • $ df -w
  • $ df -z
  • $ df -gg
Show full summary Hide full summary

Similar

The Flowering Plant and Photosynthesis
lalalucy13
English Language Terms
ekimlauretta
AQA Human Geography
georgie.proctor
A Christmas Carol Quotes
0serenityrose0
anatomy of the moving body: Skeletal system
Rupa Kleyn
English / FRUIT
Jan Laxckey
Think Python
tsilvo2001
GCSE Maths: Understanding Pythagoras' Theorem
Micheal Heffernan
MAPA MENTAL
blanca beatriz m
Design Tips for Non-Designers
Micheal Heffernan
1PR101 2.test - Část 17.
Nikola Truong