LinuxAdminRH124

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Given: You are the consultant1 user on a Linux system in the/home/consultant1/reports directory. Which command will copy the /home/consultant1/report/manage-files.txt file to /home/consultant1/reports/manage-files-copy.txt and preserve the date-time stamp of the source file?

cp manage-files.txt manage-files-copy.txt

Given: You are the consultant1 user on a Linux system in the consultant1 home directory. Which command will capture the first seven lines of hte /home/consultant1/bin/manage-files file and append it to the /home/consultant1/reports/manage-files.txt file?

head -7 bin/manage-files >> reports/manage-files.txt

Which command will display the idle block device containing an XFS system?

lsblk -fs

Which command is used to export the public encryption key from one server to another?

ssh-key-copy

Which command is used to crate SSH keys?

ssh-keygen

Which command creates a new user named itChair that uses the group departmentChairs as one of its secondary groups?

useradd -G departmentChairs itChairs

Which command allows us to see the real-time system status?

top

Given: You are the consultant1 user on a Linux system in teh consultant1 home directory. Whic of the following commands will create three empty files in the/home/consultant1/reports directory named report1,report2, report3?

touch reports/reports(1,2,3)

Which entry below in the/etc/hosts file sets client-review4 as the canonical host name for the IPv4 address 172.25.250.10 of the hosts servera.lab.example.com

172.25.250.10 servera.lab.example.com servera client-review4

When using the vim editor, what key sequence will exit out of the vim editor and not save changes to the file?

Esc :q! Enter

When using the vim editor, what key sequence will save changes to the file and exit out of the vim editor?

Esc :wq Enter

Given: You are a developer1 user on a Linux system in the/home/developer1 directory. Which command will create a soft link named /home/developer1/softlink to the file /home/developer1/reports/report1?

In -s reports/report1 softlink

Given: You are the developer1 user on a Linux system in the /home/developer1 directory. Which command will create a hard link named /home/developer1/hardlink to the file /home/developer1/reports/report1?

In reports/report1 hardlink

In the/etc/ssh/sshd_config file, what key-value pair is used to prevent users form logging in as root with SSH?

PermitRootLogin no

Which command sets the maximum age of the password of itProgrammer to 45 days?

chage -M 45 itProgrammer

Which command forces itChair to change its password on first login?

chage -d 0 itChair

Which command sets the minimum age of the password of itProgrammer to 20 days?

chage -m 20 itProgrammer

Which command will give read, write and execute permissions on /tmp/sandbox.sh to all users?

chmod 777 /tmp/sandbox.sh

Given: There is a new directory called /home/db1/scripts/python Which command will set db1 and dbas as the owning user and group respectively?

chown db1:dbas /home/db1/scripts/python

Which command reports file system disk space usage?

df

Which command will locate all *.conf files on the entire file system, direct any file names found to conf_files.txt and direct any error messages to find_error.txt?

find / -name '*.conf' > conf_files.txt 2>find_error.txt

Which command will locate all files having devloper1 and developer as the owning user and group, respectively. The file must also have the octal permissions of 640. Record the absolute paths to all of these files in /tmp/developer.txt text file. Don't display or record any error messages.

find / -user developer1 -group developer -perm 640 > /tmp/developer.txt 2>/dev/null

Which command creates new group named departmentChairs with GID 12345?

groupadd -g 12345 departmentChairs

Given: /etc/rsyslog.d/grading-debug.conf has been configured to log all messages it receives that have the priority level of debug or higher to the file /var/log/grading-debug and the rsyslog service has been restarted. Which command will generate the log message "program start" having the debug priority?

logger -p debug "program start"

Given: You are the consultant user on a Linux system in the consultant1 home directory. Which of hte following commands will create a new directory called /home/consultant1/reports?

mkdir reports

Which command will provide the name of the Ethernet interface?

nmcli device status

Which command will remotely transfer the archive file /tmp/kerberos.tar to the directory /tmp on serverb? Specify /home/dba1/.ssh/review3_key as the private key of the SSH key pair?

sftp -i .ssh/review3_key/tmp/kerberos.tar dba1@serverb:/tmp

Which command will mount the vdb2 block device on the /db2-disk directory as the superuser?

sudo mount /dev/vdb2 /db2-disk

Given: A new connection named wireless1 has been created. Which command will activate this new connection?

sudo nmcli connection up wireless1

Which command creates an archive named /tmp/kerberos.dar as the superuser containing the contents of /var/kerberos?

sudo tar -cvf /tmp/kerberos.tar /var/kerberos

Which command will set the timezone to America/Chicago?

sudo timedatect1 set-timezone America/Chicago

Which command will install the cups package that supports printing?

sudo yum install cups

Which command will uninstall the cups package that supports printing?

sudo yum remove cups

Whic command reloads the sshd service?

systemctl reload ssh.service

Given: You are the consultant1 user on a Linux system in the consultant1 home directory. Which command will write the last three lines of /home/consultant1/bin/manage-files to the file /home/consultant1/reports/manage-files.tx and overwrite and text already in the file /home/consltant1/reports/manage-files.txt.

tail -3 bin/manage-files > reports/manage-files.txt


Kaugnay na mga set ng pag-aaral

World History Chapter 10: Medieval Kingdoms Review (Set A)

View Set

General Biology 1: Final Exam Review Guide

View Set

Basic Electrical Theory. (Unit 17) Capacitance.

View Set

SmartBook Assignment Chapter 19: Electrochemistry

View Set

Chapter 16: The Era of Reconstruction

View Set