Lab / Written Answer

Ace your homework & exams now with Quizwiz!

Type the full device file name for the first partition on the hard drive with the third lowest ID number.

/dev/sdc1

Users at your site are using the Bash shell. You want to set a variable that will apply to every user .... Which file would you place this variable in? (Type answer)

/etc/profile

Match the correct /proc directory contents ... Type the command.

/proc

Which command will merge two files on a line-by-line basis, and separate each line with a tab?

paste

You have several messages in the You have several messages in the sendmail queuq. What command should you use?

sendmail -q

Use the dmesg command to see error messages as they occur ...

sort

Which command will display the contents of a sendmail mail queue?

sendmail -bp mailq

According to the command help, which switch can you use with the killall command to kill a process group instead of just a process? (Type command and then answer)

-h -g

Type the full device file name for the second partition on the hard drive with the lowest ID number?

/dev/sda2

directory contains user data for all standard users on the system? (Tip: Enter the full path to the directory.)

/home

Lab: You need to view detailed information for the hr directory in the root (/) directory ... (Type commands to get the answers)

/hr ls -l

Lab: Use ps aux | less to answer the following questions: (Just type the command)

ps aux | less

Use the quota command to answer the following questions: (Type the command)

quota -u username

Lab: An employee in another department recently provided several important files for your current assignment. The files are compressed in a tar file. Today you need to extract each file and begin to use the files. Your task in this lab is to extract the files in /proj_files.tar.gz into the /projects directory.

tar -xzf /proj_files.tar.gz -C /projects

Lab: What does the -M switch do with the useradd command? (Answer: Prevents the home directory)

useradd -h

Which command will print the line count, word count and byte count respectively in the /home/gshant/servepath file?

wc -lwc /home/gshant/servepath

Enter the SQL command that will list all the tables in the grades database.

SHOW TABLES grades;

You need to create a symbolic link to the /usr/share/zoneinfo/EST time zone file ...

ln -s /usr/share/zoneinfo/EST /etc/localtime

You need to edit the Gnome Display Manager (GDM) settings on your Linux system. What is the configuration file for the GDM display manager? (Tip: Enter the full path to the file.)

/etc/X11/gdm/gdm.conf

Which directory allows you to name devices when they are connected to the system? (Tip: Enter the full path to the directory.)

/etc/udev/rules.d/

Which directory contains the locale configuration files on a Linux distribution? (Tip: Enter the full path to the directory.)

/usr/share/local

Which directory contains data files that change constantly, including e-mail, print jobs, and proxy cache files? (Tip: Enter the full path to the directory.)

/var/

Lab: Which command could you use to verify if a crontab file exists for user thobbs?

crontab -l -u thobbs

Use the du command to answer the following questions: (Type the command first) - How big is the /home/wadams directory? (100 K) - What is the largest directory in /home/wadams? (./ .config) - What is the size of the ./.config/ibus/bus directory? ( 40 K)

du

Lab: Your task in this lab is to: - Rename the sales group to western_sales_division. - Create the eastern_sales_division group. - Assign aespinoza as the only member of the eastern_sales_division group. - When you are finished, view the /etc/group file or use the groups command to verify the changes.

groupmod -n western_sales_division sales groupadd eastern_sales_division usermod -G eastern_sales_division aespinoza cat /etc/group

Your task in this lab is to restart the network interface card without restarting the computer.

ifconfig -a ifup eth1

Your task in this lab is to log out of the system, while leaving the system powered on.

logout

You must complete the following tasks for this lab: - Find the baby1 print job job number. - Delete the baby1 print job from the print queue.

lpq lprm 1

Lab: Your task in this lab is to print the sales document in /home/wadams.

lpr sales

Lab: Your task in this lab is to insert the powermate module into the kernel. Use lsmod to verify that the device driver was not compiled into the kernel and then to confirm that you have loaded the module into the kernel.

modprobe powermate

You need to connect to a remote system whose host name is abc.def.com ... The username that has permissions to execute that script is babba.

ssh -l bubba abc.def.com

Lab: Maggie Brown (mbrown) and Corey Flynn (cflynn) ... Your task in this lab is to add the hr group as a secondary group for the mbrown and cflynn user accounts. When you are finished, view the /etc/group file or use the groups command to verify the changes.

usermod -G hr mbrown usermod -G hr cflynn groups username

Which type of looping script executes while a condition is true?

while

Your task in this lab is to change your password to r8ting4str. The password for the administrator account is 7hevn9jan.

passwd

A calls with a problem ... What is needed in every if-then routine?

fi

Which command should you use to set the SUID bit on a script?

Run dmesg

Lab: /etc/shells file contains a list of shells that are available on the current system. View the contents of the file and answer the following question. Of the shells listed below, which are not available on the system? (Type out command and answer)

cat /etc/shells /bin/ksh

Use the cat /proc to answer the following questions: (Only type the command) - What is the CPU speed (in MHz)? Enter the exact total (including decimal places). - How much physical memory does the system have (in kB)? Look for the MemTotal line in the corresponding file. - What is the Linux kernel version? Enter the version in the format of n.n.n.n-n.

cat /proc

Lab: An assistant administrator has been modifying permissions on the /hr directory. You want to quickly change the permissions on /hr to match the permission settings documented in your company's security policy. Your task in this lab is to modify the permissions on the /hr directory as follows: User = read, write, execute Group = read, execute Other = read, execute

chmod 755 /hr

Lab: Brenda Cassini (bcassini) is taking over the payroll documentation for Will Adams (wadams). Your task in this lab is to give the bcassini user ownership of the /hr/payroll file. Use the ls -l command to verify the ownership changes. (Type the commands)

chown bcassini /hr/payroll ls -/hr

You need to change the how the formatting displays the /home/varstown file ...

expand -t3 /home/varstown

Use Use fdisk -l to answer the following questions about the partition table. to answer the following questions: (Write the command first) - Which physical disk is the swap area on? (1st) - Which disk partition is the swap area on? (5th) - beginning cylinder for the swap area? 9668 - What is the allocated size of the swap area in blocks? (473632) - Which physical disk is the boot disk on? (1st) - Which disk partition is the boot disk on? (1st)

fdisk -1

Your task in this lab is to stop the eth1 NIC as the first step to try to isolate the problem.

ifdown eth1

Your task in this lab is to: View the installed modules and identify the module with mouse in its name. Remove the mouse driver module from the kernel.

lsmod rmmod mousedev

Lab: Your task in this lab is to mount the DVD-ROM drive to the /media/dvd directory. After you mount the DVD drive, view the /media/dvd directory to verify that you can access the application installation file.

mount /dev/dvd media/dvd ls /media/dvd

You need to change the formatting of the You need to change the formatting of the /home/varstown file as it prints. You need to add double-spacing to each file as it prints. Specifically, you need to add double-spacing to each line in the file. What command should you use?

pr -d /home/varstown

Lab: What is your current working directory? (Type command and the answer)

pwd

Lab: To prevent the users from using too much disk space, you have implemented hard and soft quotas on the root directory (/). Today you noticed that the quotas are turned off. Your task in this lab is to re-enable quotas for the root directory (/).

quotaon /

Lab: /dev/sdc1 is the first partition (1) on the hard drive with the third lowest ID number (c). /dev/sdxn /dev/sdxn file names identify hard file names identify hard drives. • A letter (beginning with a) follows the A letter (beginning with a) follows the sd designation and identifies the ID of the hard drive. • At the end is appended a number (beginning with 1) that identifies the partition on the drive. (Type the command used).

repquota -a

You are editing the GRUB configuration file, and you need to configure the /dev/sda3 as the root drive. What entry should you add as the root drive.

root (hd0,2)

Salman Chawla (schawla) forgot his password ... Your task in this lab is to: - Change the password for the schawla user account to G20oly04. - Make sure the password is encrypted in the shadow file. You are logged on as wadams. The password for the root account is 1worm4b8.

su -c "passwd schawla"

Lab: Salman Chawla (schawla) is no longer part of the sales team ... Your task in this lab is to remove user schawla from all secondary group memberships. When you are finished, view the /etc/group file to verify the changes.

usermod -G "" schawla cat etc/group

Lab: Will Adams (wadams) owns and maintains a database file in /home/wadams called contacts.db. The file holds contact information for perspective clients. Brenda Cassini (bcassini) and Vera Edwards (vedwards) want to access and add contact information to the file to share the data among the three users. Your task in this lab is to create hard link files to /home/wadams/contacts.db as follows: Use contacts_link as the hard link name Create the file in the following directories: /home/bcassini /home/vedwards (Type commands)

ln /home/wadadms/contacts.db home/bcassini/contacts_link ln /home/wadadms/contacts.db home/vedwards/contacts_link

Lab: You've installed a new hard drive, and you want to format the partition with the Reiser file system (ReiserFS). Your task in this lab is to format /dev/sdb2 with the Reiser file system (ReiserFS).

mkreiserfs /dev/sdb2 mkfs -t reiserfs


Related study sets

Fundamental and Derived Quantities and Units

View Set

RN nutrition online practice 2023 B

View Set

CSC-325: Quiz 8 Review Questions

View Set

Varcarolis: Chapter 13 - Bipolar and Related Disorders

View Set

Windows Command Line (examcomppass)

View Set