Syst admin socrative

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

Which character starts a comment line in a shell script file?

#

What variable contains the total number of arguments passed into a script?

$#

What option / switch for ls prints a recursive listing of a directory's content?

-IR

Which command is used to extract a column from a text file?

-cut

Which permissions are set on a regular file once the permissions have been modified with the command chmod 654 file.txt?

-rw-r-xr--

What is the first character for file or directory names if they should not be displayed by commands such as 'ls' unless specifically requested?

.

Which of the following devices represents a hard disk partition?

/dev/sdb2

After installing a new package, in which directory are you most likely find its configuration file?

/etc

While viewing a man page, you want to search for the word 'hidden'. To search for that word within the man page, what command would you use?

/hidden

Which is the absolute path of the personal directory of the user Elvis?

/home/Elvis

Which of the following is the home folder for the root user?

/root

Which of the following directories contain temporary files for run-time variable data used by running processes and must be removed at every reboot?

/run

In which directory are binary files that are typically only used by root users located?

/sbin

What is a Linux distribution?

A bundling of the Linux kernel, system utilities and other software.

Choose two commands to execute the script called script.sh.

Bash script.sh ./script.sh

Which three commands could you use to move from the current directory to the user's home directory?

Cd ~, cd, cd $HOME

Why are web browser cookies considered dangerous?

Cookies support identification and tracking of users.

Which Linux distribution is used as the basis for the creation of Ubuntu?

Debian

Which of the following Linux distributions uses the apt package management system? (Choose more than one)

Debian Ubuntu

What does the value of the PATH variable represent?

Defines the directories where the binary files are located

Which of the following statements regarding Linux hardware drivers is correct?

Drivers are either compiled into the linux kernel or are loaded as kernel modulus

A directory contains the following files: file1.txt file2.txt file3 What would be the output of the following shell script? for file in *.txt do echo $file done

File1.txt file2.txt

How could one search for the file 'foo.txt' under the directory '/home'?

Find /home -name foot.txt

How is it possible to determine if an executable file is a shell script which is read by Bash?

First line is #!/bin/bash

Which of the following examples shows the general structure of a for loop in a shell script?

For file in *.txt do echo $i done

Which of the following commands will print lines from the file world.txt that contain matches to "changes" and "changed"?

Grep change[ds] world.txt2

What are the differences between hard disk drives and solid state disks? (Choose two.)

Hard disks have a motor and moving parts, solid state disks do not. Solid state disks provide faster access to stored data than hard disks.

You have a program called /usr/bin/aloha. You wish to create a symbolic link, /home/user/aloha, that points to it. Which command will do this task?

In -s /usr/bin/aloha /home/user/aloha

Which are the typical services offered by cloud providers? Choose three.

Infrastructure as as Service Platform as a Service Software as a Service

Which of the following programs is a graphical editor for vector graphics?

Inkscape

Which command is used to display all the assigned ip addresses of a host?

Ip addr show

A Linux computer has no access to the Internet. Which command displays information about the network gateway for the system?

Ip route

Which of the following statements are true of a typical shell script? (Choose two.)

It has the executable permission bit set. It starts with the two character sequence #!.

Which function does a shell program serve?

It receives user commands and executes them

Which of the Ubuntu releases is considered stable and fit to use for business purposes?

LTS

Which command lets you determine the time of the last restart of a system?

Last reboot

The command find / -name '*' will:

List all files and directories recursively starting from /

Which of these commands displays hardware information? Choose two. Hint... if you don't know the answer, eliminate those that you KNOW are incorrect.

Lshw and dmidcode

Which of the following commands moves the directory ~/summer-vacation and its content to ~/vacation/2021?

Mv ~/summer-vacation ~/vacation/2021

What does exist status 0 indicate about a process or script?

No problems

Where is the operating system on an Rpi stored?

On a removable SD card which is put into the Raspberry Pi.

Which of the following commands adds the directory /scripts/new/ to the **FRONT** of the PATH environment variable?

PATH=/scipts/new: $PATH

Which of the following software packages is an email server?

Postfix

Which of the following services are used for network file systems? Choose two

Samba, NFS

After using a text editor to create a shell script, what step should you take before trying to use the script by typing its name?

Set one or more executable bytes using chmod

Which command is used to sort the output?

Sort

Which one of the following statements concerning the General Public License (GPL) is true?

The GPL is designed to ensure that the source code of a software remains freely available

Which statements about the directory /etc/skel are correct? (Choose two.)

The files from the directory are copied to the home directory of a new user when the account is created. The directory contains a default set of configuration files used by the useradd command.

Which of the following will define the purpose of the Free Software License?

To establish the conditions for modification and distribution

Which command will display running process information in real time? Choose all that apply.

Top, htop

Which of the following commands can be used to create a file?

Touch

Which of the following tools is the best to install a software package and all its dependencies on a RHEL based systems?

YUM

Which command is used to view compressed txt file contents?

Zcat

When typing a long command in a terminal, what single characte can be used to split a command across multiple lines?

\

for token in a b c; do echo -n ${token}; done

abc

What is the correct command to extract the contents of the archive file taro.bz2?

bunzip2 taro.bz2

The ________ Bash scripting command is used to control the program flow based on a variable that can take many values (such as all the letters of the alphabet).

case

Which commands will archive /home and its contents to /mnt/backup? (Choose two)

cp -ar /home /mnt/backup tar -cf /mnt/backup/archive.tar /home

Which command would one use to look at detailed information related to DNS, such as the A and CNAME records?

dig

Which command displays the content of the Linux kernel's ring buffer?

dmesg

The ________ Bash scripting command is used to display prompts for a user in a shell script

echo

Which command is used to make a shell variable known to subsequently executed programs?

export

Which command is used to identify file type?

file

What keyword is used in a shell script to begin a loop? (Specify one keyword only, without any additional information.)

for

Which command will display memory usage?

free

Which of the following commands will output all of the lines that contain either the string 'Fred' or 'fred'? (Choose TWO correct answers.)

grep - i fred data_file, grep '[Ff]red' data_file

Which command is used to test name resolution?

host

Which of the following commands can be used to view a file and do search operations within it while viewing the contents?

less

You have a program called /usr/bin/aloha. You wish to create a symbolic link, /home/user/aloha, that points to it. Which command will do this task?

ln -s /usr/bin/aloha /home/user/aloha

Which network interface always exists in a Linux system?

lo

Which command would you use to show hidden files in a directory?

ls -a

Where is the BIOS located?

motherboard

The main purpose of the Linux Kernel is to :

provide management of system resources

Which package management tool is used in Red Hat-based Linux Systems?

rpm

You are concerned that some malicious actor is attempting to log into your server using a password stuffing attack. Which command would you use to see if there were a lot of failed login attempts?

sudo lastb

Which command would you use to see the last 20 lines of the test.txt file including blank lines?

tail -n 20 test.txt

Which commands will archive /home and its contents to /mnt/backup? (Choose two)-

tar -cf , cp -ar/home

Which of the following commands can be used to extract files from an archive?

tar -xvf

What command would you use to create a new archive of /tmp/Archive (named archive.tar.bz2) with bz2 compression?

tar cjf archive.tar.bz2 /tmp/archive

Where can a boot loader be installed?

the MBR on a hard drive

You are viewing a file and see the following information. elvis:!$$LMl15zsd$lasdfp093rkljaf90:18900:0:99999:7::: What does it indicate about the elvis account?

the elvis account is locked

Which command is used to display the operating system name?

uname -s

What command line will create the user 'badabing' with a home directory and is assigned to the group 'users' as primary group?

useradd -m -g users badabing


Kaugnay na mga set ng pag-aaral

Pharm Endocrine - Thyroid (ch 31)

View Set

World History Chapter 10 Vocab Quiz

View Set

Controlling Foodservice Costs Final Exam

View Set

Chapter 21: The Musculoskeletal System

View Set

Unit 4 Test: Chemical Thermodynamics

View Set