Quiz
LPIC 101-500 = test 8
This quiz has a time limit, so it opens in the usual player.
Questions in this quiz (60)
11.- Which symbol is used for command substitution?
- A`command` or $(command)
- B${command}
- C%command
- D#command
22.- What does read var do?
- ATakes user input into variable var
- BDisplays a variable
- CDeletes a variable
- DReads from a file
33.- What is #!/bin/sh used for?
- ASpecifies script interpreter as Bourne shell
- BComments out line
- CImports shell library
- DDisplays system shell
44.- What does basename /home/user/file.txt return?
- Afile.txt
- B/home/user
- C/
- Duser
55.- What does dirname /home/user/file.txt return?
- A/home/user
- Bfile.txt
- Cuser
- D/
66.- Which variable stores the user’s home directory?
- A$HOME
- B$PATH
- C$PWD
- D$USER
77.- Which variable contains the username?
- A$USER
- B$LOGNAME
- C$USERNAME
- DAll of the above
88.- What does set without arguments do?
- ALists all shell variables and functions
- BUnsets all variables
- CShows aliases only
- DDisplays PATH
99.- How do you disable command history temporarily?
- Aset +o history
- Bunset HISTFILE
- Chistory -d
- DBoth A and B
1010.- What does history -c do?
- AClears the command history
- BCopies the history
- CDisplays the history count
- DCompresses the history file
1111.- Which command creates an ext4 filesystem on /dev/sdb1?
- Amkfs.ext4 /dev/sdb1
- Bformat /dev/sdb1 ext4
- Cmke2fs -x4 /dev/sdb1
- Dnewfs /dev/sdb1
1212.- Which tool is used to check and repair ext2/3/4 filesystems?
- Afsck
- Bchkdsk
- Ctune2fs
- Dmkfs
1313.- What command lists all available block devices?
- Alsblk
- Bblkid
- Cdf -h
- Dls /dev
1414.- Which command displays filesystem UUIDs?
- Ablkid
- Buuidshow
- Clsuuid
- Dfsid
1515.- To create an XFS filesystem, you use:
- Amkfs.xfs
- Bmkfs.ext4
- Cxfs_mkfs
- Dnewfs.xfs
1616.- Which command creates a Btrfs filesystem?
- Amkfs.btrfs /dev/sdb1
- Bmkbtrfs /dev/sdb1
- Cmkfs.bfs /dev/sdb1
- Dbtrfs-create /dev/sdb1
1717.- Which filesystem supports snapshots natively?
- ABtrfs
- Bext4
- CFAT32
- DexFAT
1818.- What is the command to label an ext4 filesystem?
- Ae2label /dev/sda1 LABELNAME
- Blabel /dev/sda1 LABELNAME
- Cmklabel /dev/sda1 LABELNAME
- Dfslabel /dev/sda1 LABELNAME
1919.- What is the purpose of tune2fs?
- AModify ext2/3/4 filesystem parameters
- BFormat ext4 partitions
- CTest disk performance
- DResize partitions
2020.- Which file lists all partitions on a disk?
- A/proc/partitions
- B/etc/fstab
- C/etc/mtab
- D/dev/disks
2121.- To check disk space usage of mounted filesystems:
- Adf -h
- Bdu -sh /
- Clsblk -f
- Dblkid
2222.- Which command checks disk usage per directory?
- Adu -sh *
- Bdf -h
- Cls -l
- Dblkid
2323.- Which option with mkfs.ext4 sets a volume label?
- A-L
- B-l
- C--label
- DBoth A and C
2424.- What is the purpose of /dev directory?
- AContains device files for hardware
- BStores drivers
- CContains configuration files
- DHolds system binaries
2525.- Which command lists UUIDs of all partitions?
- Ablkid
- Blsblk -f
- Ccat /etc/fstab
- DBoth A and B
2626.- To check the type of filesystem on a device:
- Ablkid /dev/sda1
- Bdf /dev/sda1
- Cfdisk -t /dev/sda1
- Dfile /dev/sda1
2727.- Which command repairs XFS filesystems?
- Axfs_repair
- Bfsck.xfs
- Ctune2fs
- Drepair.xfs
2828.- Which tool manages Btrfs subvolumes?
- Abtrfs subvolume
- Bbtrfsctl
- Cmkbtrfs
- Dfsck.btrfs
2929.- What is the maximum file size supported by ext4?
- A16 TB
- B4 TB
- C1 TB
- D32 TB
3030.- Which filesystem is best suited for enterprise environments and large files?
- AXFS
- Bext2
- CFAT32
- DNTFS
3131.- To display partition table information:
- Afdisk -l
- Blsblk -t
- Cpartshow
- Dshowdisk
3232.- What is GPT?
- AGUID Partition Table
- BGlobal Partition Type
- CGeneral Partition Table
- DGraphical Partition Tool
3333.- What is the maximum number of primary partitions in MBR?
- A4
- B8
- C2
- DUnlimited
3434.- To format a partition with ext3 filesystem:
- Amkfs.ext3 /dev/sda2
- Bformat -t ext3 /dev/sda2
- Cmakefs /dev/sda2 ext3
- Dfscreate ext3 /dev/sda2
3535.- What command resizes an ext4 filesystem?
- Aresize2fs
- Bext4resize
- Cmkfs -r
- Dgrowfs
3636.- What is the default block size in ext4?
- A4 KB
- B1 KB
- C8 KB
- D512 bytes
3737.- What does the mount command do?
- AAttaches a filesystem to a directory
- BFormats a disk
- CChecks filesystem consistency
- DUnmounts partitions
3838.- To unmount a filesystem:
- Aumount /mnt
- Bunmount /mnt
- Cdetachfs /mnt
- Dfsumount /mnt
3939.- What file contains information about permanent mounts?
- A/etc/fstab
- B/etc/mtab
- C/proc/mounts
- D/etc/mount.conf
4040.- What option in /etc/fstab mounts a filesystem read-only?
- Aro
- Brw
- Cnoexec
- Dnosuid
4141.- What command displays currently mounted filesystems?
- Amount or findmnt
- Bdf -T
- Cblkid
- Dlsblk
4242.- Which file lists currently mounted filesystems dynamically?
- A/etc/mtab
- B/etc/fstab
- C/proc/partitions
- D/etc/disktab
4343.- Which filesystem is best for SSDs due to copy-on-write design?
- ABtrfs
- Bext2
- CFAT32
- DNFS
4444.- What command syncs filesystem buffers to disk?
- Async
- Bflush
- Ccache -w
- Dcommit
4545.- Which tool shows filesystem usage in a tree format?
- Adu --max-depth=1
- Bdf -h
- Cls -R
- Dtree -s
4646.- Which command creates a swap partition?
- Amkswap /dev/sda3
- Bmkfs.swap /dev/sda3
- Cswapon -m /dev/sda3
- Dswapcreate /dev/sda3
4747.- Which command activates a swap area?
- Aswapon /dev/sda3
- Bswapstart /dev/sda3
- Cmount -t swap /dev/sda3
- Dswapenable /dev/sda3
4848.- Which command disables swap usage?
- Aswapoff /dev/sda3
- Bswapdisable /dev/sda3
- Cumount /dev/sda3
- Dswapdown /dev/sda3
4939.- To view active swap areas:
- Aswapon --show
- Bcat /proc/swap
- Cdf -T
- DBoth A and B
5050.- What command tests disk I/O performance?
- Add if=/dev/zero of=/tmp/test bs=1M count=100
- Bfsck
- Cdu
- Dlsblk
5151.- Which filesystem allows dynamic resizing without unmounting?
- ABtrfs
- Bext2
- CFAT16
- DISO9660
5252.- Which filesystem lacks journaling?
- Aext2
- Bext3
- Cext4
- DXFS
5353.- What is journaling in filesystems?
- ALogging metadata for crash recovery
- BStoring user logs
- CCreating backups
- DFragmentation tracking
5454.- Which command displays inode usage?
- Adf -i
- Bdf -H
- Cls -li
- Ddu -i
5554.- Which command lists filesystem types supported by the kernel?
- Acat /proc/filesystems
- Bls /etc/filesystems
- Cshowfs
- Dlistfs
5656.- What does mount -a do?
- AMounts all filesystems from /etc/fstab
- BMounts all devices
- CMounts removable drives only
- DLists mounts
5757.- What is the difference between /etc/fstab and /etc/mtab?
- Afstab is static, mtab is dynamic
- Bmtab lists only root mounts
- Cfstab is temporary
- DBoth are identical
5858.- What command displays filesystem statistics (free blocks, inodes, etc.)?
- Adumpe2fs
- Bfsck
- Ctune2fs
- Ddf
5959.- Which filesystem allows transparent compression?
- ABtrfs
- BXFS
- Cext4
- DFAT32
6060.- To see disk partition alignment and type interactively:
- Aparted /dev/sda
- Bfdisk /dev/sda
- Cgdisk /dev/sda
- DAll of the above
Information
- Description
- LPIC 101-500
- Author
- David OkOk
- Language
- Español
- Views
- 0
- Tags
- Rating
- No ratings yet Rate this quiz
More on Command Line Basics and Linux Commands