Linux Command Line and Shell Scripting, Exams of Social Sciences

A wide range of linux command line and shell scripting topics, including accessibility tools, file management, text processing, partitioning and file systems, system administration, and more. It provides answers to various questions related to these topics, making it a valuable resource for linux users and administrators. The document could be useful for university students studying computer science, information technology, or related fields, as it covers fundamental linux concepts and commands that are commonly used in these disciplines. The level of detail and breadth of topics addressed suggest that this document could be suitable for use as study notes, lecture notes, or a summary for an introductory linux course at the university level.

Typology: Exams

2023/2024

Available from 09/21/2024

ROCKY-B
ROCKY-B 🇰🇪

4.4

(16)

40K documents

1 / 14

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
SUSE EXAM 1 QUESTIONS AND ANSWERS
Which of the following is not an item that you will find on the panel at the bottom of the
GNOME desktop?
a. Clock
b. Workspaces
c. Control Center
d. Computer menu - Answers -C. Control Center
What is the name of the GNOME File Manager?
a. GNOMEfile
b. Nautilus
c. Explorer
d. Midnight Commander - Answers -b. Nautilus
Which of the following AccessX keyboard accessibility settings can be used to sound an
audible alert whenever Caps Lock is turned on?
a. ToggleKeys
b. StickyKeys
c. BouncerKeys
d. DelayKeys - Answers -a. ToggleKeys
Which accessibility tool can be used as a screen reader and magnifier?
a. Jupiter Speech System
b. Orca
c. Magnifier
d. AccessX - Answers -b. Orca
How can you switch to a graphical virtual terminal in SUSE linux?
a. Ctrl+Alt+F1
b. Ctrl+Alt+F7
c. Type GNOME at the command line
d. Type X at the command line - Answers -b. Ctrl+Alt+F7
Which file is read by all login shells?
a. /etc/profile
b. /etc/bashrc
c. /etc/bash.bashrc
d. ~/.profile - Answers -a. /etc/profile
Which key may be used to complete file and directory names on the command line?
a. Ctrl+c
b. ~
c. &
d. Tab - Answers -d. Tab
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download Linux Command Line and Shell Scripting and more Exams Social Sciences in PDF only on Docsity!

SUSE EXAM 1 QUESTIONS AND ANSWERS

Which of the following is not an item that you will find on the panel at the bottom of the GNOME desktop? a. Clock b. Workspaces c. Control Center d. Computer menu - Answers -C. Control Center What is the name of the GNOME File Manager? a. GNOMEfile b. Nautilus c. Explorer d. Midnight Commander - Answers -b. Nautilus Which of the following AccessX keyboard accessibility settings can be used to sound an audible alert whenever Caps Lock is turned on? a. ToggleKeys b. StickyKeys c. BouncerKeys d. DelayKeys - Answers -a. ToggleKeys Which accessibility tool can be used as a screen reader and magnifier? a. Jupiter Speech System b. Orca c. Magnifier d. AccessX - Answers -b. Orca How can you switch to a graphical virtual terminal in SUSE linux? a. Ctrl+Alt+F b. Ctrl+Alt+F c. Type GNOME at the command line d. Type X at the command line - Answers -b. Ctrl+Alt+F Which file is read by all login shells? a. /etc/profile b. /etc/bashrc c. /etc/bash.bashrc d. ~/.profile - Answers -a. /etc/profile Which key may be used to complete file and directory names on the command line? a. Ctrl+c b. ~ c. & d. Tab - Answers -d. Tab

Which command below is a filter command that reads the standard input and writes it to both the standard output and a specified file? a. trunk b. branch c. y d. tee - Answers -d. tee Which of the following uses "proper" command syntax? a. Command | Command b. Command > Command c. Command < Command d. Command >> Command - Answers -a. Command | Command Normally, redirecting is destructive on existing files, which item will append to existing files? a. <> b. >< c. >> d. none of the above - Answers -c. >> Which of the following will run the cd command if the ls command is successful? a. ls / || cd / b. ls / && cd / c. ls / &) cd / d. ls / |) cd / - Answers -b. ls / && cd / What key can you press while in insert mode within the vi editor to switch to command mode? a. i b. : c. Esc d. Alt - Answers -c. Esc Which echo backslash sequence creates a trailing new line in a shell script? a. \r b. \c c. \n d. \a - Answers -b. \c Which two control structures below are looping structures? (choose 2) a. case b. until c. if d. while - Answers -b. until and d. while Which command will determine the type of a file by examining its contents?

a. /usr/share/doc b. /usr/share/man c. /usr/share/info d. /usr/share/howto - Answers -a. /usr/share/doc Which of the following is not a valid environment variable? a. PS b. GREP c. HOME d. PATH - Answers -b. GREP Which of the following commands can be used to set an alias? a. export b. umask c. alias d. MYALIAS= - Answers -c. alias Which command may be used to search for files in directories listed within the PATH variable? a. which b. find c. locate d. slocate - Answers -a. which Which of the following command would list all lines that contain the word "super" at the end of the line in the /etc/hosts file? a. grep 'super=' /etc/hosts b. grep '^super' /etc/hosts c. grep 'super$' /etc/hosts d. grep '[super]' /etc/hosts - Answers -c. grep 'super$' /etc/hosts Which text tool can be used to format a file for printing? a. nr b. expand c. pr d. split - Answers -c. pr Which text tool can be used to replicate tab characters with space characters? a. tr b. unexpand c. od d. expand - Answers -d. expand Which of the following sed commands will replace all "teh" strings with "the" in the /etc/hosts file? a. sed s/teh/the/ /etc/hosts

b. sed /the/teh/ / etc/hosts c. sed g/teh/the/ /etc/hosts d. sed s/teh/the/g /etc/hosts - Answers -d. sed s/teh/the/g /etc/hosts Which of the following commands can be used to display your locale information? a. locale b. tzinfo c. tzconfig d. iconv - Answers -a. locale How many primary partitions can be created on a hard disk of an x86 system? a. 1 b. 4 c. 256 d. 1022 - Answers -b. 4 Which two partitions are required for a SUSE Linux installation at minimum? (choose 2.) a. A swap partition b. A /boot partition c. A root (/) partition d. A /usr partition - Answers -a. A swap partition & b. A /boot partition Which file is used to the list of partitions and file systems that are mounted at boot time? a. /etc/mtab b. /tmp/filesystems c. /dev/sda d. /etc/fstab - Answers -d. /etc/fstab Which device file refers to the second partition on the third SCSI hard disk in SUSE linux? a. /dev/sdb b. /dev/sdc c. /dev/sdb d. /dev/sdc3 - Answers -b. /dev/sdc Which of the following statements are true regarding the LVM? a. Physical volumes are created from the available space within a volume group that is comprised of one or more logical volumes b. Volume groups contain logical volumes that are created from the available space within a physical volume c. Logical volumes are grouped into volume groups and store information in a specific physical volume d. Logical volumes are created from the available space within a volume group that is comprised of one or more physical volumes - Answers -d. Logical volumes are created from the available space within a volume group that is comprised of one or more physical volumes

What partitioning and file system options can be configured during a SUSE Linux installation? (choose all that apply.) a. Software RAID b. Partition creation, deletion, and resizing c. LVM d. File system - Answers -a. Software RAID, b. Partition creation, deletion, and resizing, c. LVM, & d. File system What can you select during the software selection phase of a SUSE Linux installation to determine whether there are prerequisite software packages for the software that you have selected? a. Dependencies > Check b. Patterns > Repositories c. Patterns > Installation Summary d. Dependencies > Package Groups - Answers -a. Dependencies > Check Which of the following are configured on the first boot following a SUSE Linux installation? (choose all that apply.) a. The root password b. System packages c. Host name d. Network configuration - Answers -a. The root password, c. Host name, & d. Network configuration If you select the Clone This System for Autoyast option at the end of the installation process, what file will contain the installation settings? a. /root/autoyast.txt b. /root/autoinst.xml c. /autoyast.txt d. /autoinst.xml - Answers -b. /root/autoinst.xml How long can a file name be on a Linux system? a. 8 characters b. 255 characters c. 1023 characters d. unlimited - Answers -b. 255 chatacters Which of the following is an absolute pathname? a. ../../etc b. var c. var/spool/.. d. / - Answers -d. / Which directory in the FHS stores system configuration files? a. /usr

b. /var c. /sbin d. /etc - Answers -d. /etc Which directory in the FHS stores programs that can only be executed by the root user? a. /sbin b. /usr c. /bin d. /var - Answers -a. /sbin What keys can you use in the menu-based (ncurses) YaST interface to navigate between selections? (choose 2) a. Tab b. Spacebar c. Alt d. Shift+Tab - Answers -a. Tab & d. Shift+Tab Which command could you execute at a command prompt to start a particular management module? a. yast module_name b. yast /module_name c. yast sw_module_name d. yast -u module_name - Answers -a. yast module_name (& maybe d. yast -u module_name) What option to the yast command could you use to display a list of YaST modules? - Answers -yast -l (or yast --list) You wish to install another software package using YaST from your SLES installation media. How can you verify that your system has the appropriate prerequisite packages? a. Start the YaST program using the --dependencies option. b. Click the Check Dependencies button within YaST. c. View the Description tab within YaST. d. Right-click the package in YaST and select Verify. - Answers -c. View the Description tab within YaST. What UID is used by the root user account? - Answers - What is the lowest GID used by normal groups? - Answers - What file stores the default UID and GID ranges used YaST when creating normal users and groups? a. /bin/login b. /etc/login.defs c. /home/.login d. /var/spool/useradd - Answers -b. /etc/login.defs

What file contains the main configuration for XOrg? a. /etc/X11/xorg.conf b. /etc/X11/fs/config c. /etc/X11/xorg/config d. /etc/X11/fs/xorg.conf - Answers -a. /etc/X11/xorg.conf What key combination can you press twice to kill a X Window session? - Answers - Ctrl+Alt+Backspace What could you type at a command prompt to start the X display manager (xdm) if it is not already started? - Answers -/etc/init.d/xdm start Which of the following configuration utilities may be used to configure your XOrg server settings using a text-based interface? a. SaX b. xvidtune c. SuperProbe d. xorgconfig - Answers -d. xorgconfig What command can you use to list the package in the RPM database that the /etc/hosts file belongs to? - Answers -rpm -qf /etc/hosts Which of the following can be used to automatically obtain software packages from the internet software repositories? (choose all that apply) a. yum b. get c. apt-get d. yast -i - Answers -a. yum, c. apt-get, & d. yast -i What command can you use to rebuild the RPM database? - Answers -rpm --rebuild You have downloaded the source code for a program that you wish to compile. Which command must you first run in the source code directory? a. ./configure b. make c. make file d. make install - Answers -a. ./configure Which of the following commands can be used to list the shared libraries used by the Bash shell (/bin/bash)? a. ldconfig -v /bin/bash b. ldd -v /bin/bash c. rpm -ivh /bin/bash d. rpm -ql /bin/bash - Answers -b. ldd -v /bin/bash

Which of the following are always stored in the /etc/passwd file? (choose all that apply) a. encrypted user passwords b. user home directory locations c. the default shell that each user uses d. primary groups for each user - Answers -b. user home directory locations, c. the default shell that each user uses, & d. primary groups for each user When you check the /etc/shadow file on your system, you notice that the date of the last password change is 12904. What does this number represent? a. The number of days since installation of the operating system b. December 9th 2004 c. The number of days since January 1st 1970 d. February 29th 2001 - Answers -c. The number of days since January 1st 1970 Which of the following files are used to obtain default user account settings when you create a user with the useradd command? (choose all that apply) a. /etc/login.defs b. /etc/useradd.default c. /etc/default/useradd d. /etc/skel - Answers -a. /etc/login.defs & c. /etc/default/useradd You have a file called "Policies&Procedures.txt" that you wish to place in the home directories of all newly created users. What directory should you place this file in? - Answers -/etc/skel After creating a new user account, what must you do to allow the user to log in to the system? - Answers -Assign the user a password. What two commands below can be used to create the group acctg and add the user bob to it? a. groupadd --p acctg b. groupadd acctg c. groupmod --A bob acctg d. groupmod --A acctg bob - Answers -b. groupadd acctg & c. groupmod --A bob acctg What command can be used to list the users who have logged into the system recently but who are not currently logged in? a. last b. who c. w d. btmp - Answers -a. last Which of the following file permissions gives the group owner the ability to edit the file contents? (choose all that apply) a. rw-rw-r-x b. rw-r-x-r-x

a. mkfs -swapfs /dev/sda b. mkswap /dev/sda c. swapon /dev/sda d. mount /dev/sda5 swap - Answers -b. mkswap /dev/sda c. swapon /dev/sda What file must you edit to ensure that your new swap partition in Question 22 is available by the system after each boot? - Answers -/etc/fstab What command can be used to show disk usage by file system? a. du b. df c. mount d. repquota - Answers -b. df You have enabled user and group quotas on the file system that is mounted to the /var directory. Which files contain the quota limits? (choose 2.) a. /var/aquota.group b. /var/aquota.user c. /aquota.group d. /aquota.user - Answers -a. /var/aquota.group b. /var/aquota.user What command can you use to modify the grace period for quota soft limits? - Answers -edquota -t What command would you use to check a ReiserFS file system for errors? a. fsckreiser b. reiserfsck c. reiserfs -check d. reiserfs --check - Answers -b. reiserfsck You cannot unmount a file system that you had previously mounted to the /mnt directory. What command can show you which users are still using the /mnt directory? - Answers -fuser -u /mnt You need to add another shared directory on your NFS server for /data. What steps must you perform? (choose all that apply.) a. Add the /data directory to the /etc/exports file b. Run the exportfs -a command c. Restart the NFS daemons d. Restart the RPC daemon - Answers -a. Add the /data directory to the /etc/exports file b. Run the exportsfs -a command Which of the following utilities can be used to monitor NFS? (choose all that apply.) a. mount

b. exportfs c. showmount d. rpcinfo - Answers -c. showmount d. rpcinfo Which backup type only includes files that were modified since the last full backup? a. full b. incremental c. differential d. copy - Answers -c. differential Which of the following archive utilities must be given a list of files to archive via stdin? a. cpio b. dump c. tar d. dd - Answers -a. cpio What tar command would you use to create a gzip-compressed archive file called /root/myfile.tar.gz that contains the entire contents of the /opt directory? - Answers -tar - zcvf /root/myfile.tar.gz /opt What command can be used to obtain a hardware report for your system? - Answers - hwinfo What file in the /proc directory can be used to list the features supported by your systems's CPU? - Answers -/proc/cpuinfo Which of the following commands can be used to insert a kernel module into the Linux kernel? (choose all that apply.) a. insmod b. modprobe c. lsmod d. depmod - Answers -a. insmod b. modprobe