Linux Final test

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

Which of the following keys can be pressed to exit less?

"q"

Which of the following Characters denotes elevated privileges in the Terminal

#

Which of the following characters in a shell prompt indicates the shell is running with root privileges?

#

You're writing a script that should accept two arguments, a username and a year, specified in that order on the command line. What variable would you use to access the year?

$2

Which of the following are System defined variables? Select all that apply

- $HOME - $BASH_VERSION

How do you execute a shell script in Terminal?

- ./shellscript - bash shellscript

The current directory contains the following file:-rwxr-xr-x 1 root root 859688 Feb 7 08:15 test.shGiven that the file is a valid shell script, how can this script be executed?

- /test.sh - bash test.sh

What are the differences between hard disk drives and solid state disks?

- 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.

What is true about the dmesg command?

- It displays the content of the Linux kernel"™s ring buffer. - It might not display older information because it was overwritten by newer information.

Which of the following programs enable root to set the ownership of files? (choose two)

- Nautilus - chown

Which Linux OSs are RPM(Red Hat) based?

- Red Hat - CentOS - OpenSUSE - Fedora

Which of the following makes a good password?

- The word password - Your telephone number - Your username - The name of a character from your favorite book **None of the above**

Which Linux OSs are Debian based?

- Ubuntu - Kali - Linux Mint

A new server needs to be installed to host services for a period of several years. Throughout this time, the server should receive important security updates from its Linux distribution. Which of the following Linux distributions meet these requirements?

- Ubuntu Linux LTS -Red Hat Enterprise Linux

Which of the following are text editors for Linux?

- vi - vim - pico - nano - kate

What option can you pass to groupadd to have it create a group with a GID number of 1027?

--gid 1027

You want to create a new system account for a server program you're installing. What option can you pass to useradd when creating the account to ensure that it's created as a system account?

--system

Which of the following options to chown changes the ownership of all the subdirectories of any specified directories, rather than just the files or directories that are explicitly passed to it?

-R

What happens to a file residing outside the home directory when the file owner's account is deleted?

-The UID of the former owner is shown when listing the file's details. -Ownership and permissions of the file remain unchanged.

What information is stored in /etc/passwd?

-The numerical user ID -The username -The encrypted password

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

-rw-r-xr--

Which options to find can you use to locate files owned by a particular user? (Select all that apply.)

-user -uid

Which of the following tar options handle compression?

-z -j

Which regular expression string matches any sequence of characters of any length?

.*

Which character has the specific purpose of specifying the root directory?

/

A user is currently in the directory /home/user/Downloads/ and runs the command ls ../Documents/Assuming it exists, which directory"™s content is displayed?

/Documents/

Which Linux directory holds program files that are critical for normal operation and that ordinary users may run?

/bin

Which of the following devices represents a hard disk partition?

/dev/sda2

Which Linux directory holds the system configuration files?

/etc

Which of the following files defines Linux groups?

/etc/group

Which of the following directories contains information, documentation and example configuration files for installed software packages?

/usr/share/doc/

Which of the following directories must be mounted with read and write access if it resides on its own dedicated file system?

/var

Where do most log files reside on a Linux computer?

/var/log

What is the UID of the user root?

0

Which of the following ports is used by SQL?

118

Which of the following values could be a process ID on Linux?

21398

How many sections are in the Man?

9

Which of the following redirection operators appends a program's standard output to an existing file, without overwriting that file's original contents?

>>

Which of the following DNS record types hold an IP address?

A MX

What is a Linux distribution?

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

You type touch afile.txt in a directory that contains no files. What will be the effect?

A new empty file called afile.txt will be created in the current directory.

What is the purpose of the / directory?

All files appear here as this is the root directory

What types of information does the id command provide?

All your group memberships Your username Your current group Your UID number

Which of the following is used as a linux Web Server?

Apache

Which of the following outcomes will you get after executing the # tar -cvf /tmp/etc.tar /etc command?

Archived file

Members of a team already have experience using Red Hat Enterprise Linux. For a small hobby project, the team wants to set up a Linux server without paying for a subscription. Which of the following Linux distributions allows the team members to apply as much of their Red Hat Enterprise Linux knowledge as possible?

CentOS

What is defined by a Free Software license?

Conditions for modifying and distributing the licensed software.

Why are web browser cookies considered dangerous?

Cookies support identification and tracking of users.

Libraries are best summarized in Linux by which of the following?

Critical Services and Programs used by the OS

What keystroke deletes a line of text when using nano?

Ctrl+K

Which of the following is a protocol used for automatic IP address configuration?

DHCP

Which of the following is the file manager for KDE?

Dolphin

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

Drivers are either compiled into the Linux kernel or are loaded as kernel modules.

Which of the following outputs comes from the command free

E.

What is true about the owner of a file?

Each file is owned by exactly one user and one group.

Which command allows for you to list all available directories that your shell will search first? *

Echo $PATH

Which of the following actions is performed when a file is uncompressed?

Extract

The _____ was created to give a standardization to the Linux filesystem structure.

FHS

You want to delete all files in a sub-directory that start with y. one file remains Yourfile.txt. Why was this file not deleted

Files in linux are case sensitive

What is the first principle of the open source Philosophy?

Free Redistribution

What is the Default Desktop for Debian and Fedora?

GNOME

What is the default desktop for Ubuntu

GNOME

Android is created by who?

Google

Which of the following would you covert video file formats?

HandBrake

Where does the kernel store its ring buffer logs?

In memory

Reverse DNS assigns hostnames to IP addresses. How is the name of the IP address 198.51.100.165 stored on a DNS server?

In the PTR record for 165.100.51.198.in-addr.arpa

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

Inkscape

Which of the following is true of a recursive parameter?

It displays the content/or includes sub-directories

What is true about a recursive directory listing?

It includes the content of sub-directories.

Which of the following Browsers acts as a file manager as well?

Konqueror

What is LAMP in Linux?

Linux, Apache, MySQL, PHP

You want to create a new Directory in the Terminal, which of the following command allows for you to do this?

Mkdir

Which of the following is a text based Email client?

Mutt

Which of the following is the file manager for GNOME?

Nautilus

Which of the follow is used as a linux email server?

Nginx

Where is the operating system of a Raspberry Pi stored?

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

What can be found in the /proc/ directory?

One directory per running process.

Which of the following is true about Open Source Software?

Open Source can be used for commercial use

Which of the following are typical services offered by public cloud providers?

Platform as a Service(PaaS) Infrastructure as a Service(IaaS) Software as a Service (SaaS)

How would you summarize a Free Software License? *

Rules for modifying/distribution the licensed software

What information can be displayed by top?

Running processes, ordered by CPU or RAM consumption.

Which of the following actions does the find command perform?

Searching a file in a directory

If you cannot find the info your looking for in the man pages which of the following provides additional info on any item located in the man pages?

See also

_____ files are those the control how the computer operates and includes things like system startup scripts, program support files, and system log files.

System

Which of the following types of bus can connect hard disk drives with the motherboard?

The SATA bus

Which of the following pieces of information on user accounts is not normally stored in the /etc/passwd file on modern Linux distributions?

The account's password

The current directory contains the following file:-rw-r""r"" 1 root exec 24551 Apr 2 12:36 test.sh The file contains a valid shell script, but executing this file using ./test.sh leads to this error: bash: ./test.sh: Permission denied What should be done in order to successfully execute the script?

The execute bit should be set in the file"™s permissions.

What does the permission string -​rwxrwx--- mean?

The file's owner and members of its group may both read, write, and execute the file, but other users have no access to it.

You're logged in as root and you type passwd auser to change auser's password. What information will passwd ask you to enter?

The new password, two times

Mary finds that she can delete George's files in /tmp. What might this imply?

The sticky bit is missing from /tmp; it should be set.

Which methods or commands provide access to superuser privileges for authorized users? (choose all that apply)

The su command Logging into the root account The sudo command

Which of the following is the file manager for Xfce?

Thunar

Which of the following can you create a new file in Linux terminal? *

Touch

How can you search summary info in the man pages?

Whatis

Which of the following allows for you to see which shell your currently working in?

Whoami

You have ran the following command chown -R mickeymouse /home/minnie . What did you just do?

You changed ownership of minne's files in her home directory to mickeymouse

FILL BLANK -When typing a long command line at the shell, what single character can be used to split a command across multiple lines?

\

Which character that represents the start of a line in a regular expression?

^

Summarize the find command?

a brute force approach to finding files

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

a. txt b. txt

How can you search man pages thoroughly for both the name/description of any item?

apropos

How can you easily move through different directories?

cd

The ownership of the file doku.odt should be changed. The new owner is named tux. Which command accomplishes this change?

chown tux doku.odt

A directory contains the following three files: texts 1.txt texts 2.txt texts 3.csv Which command copies the two files ending in .txt to the /tmp/ directory?

cp *.txt /tmp/

You want to copy the contents of the ~/important directory, including all its subdirectories, to /media/usb. What command can you type to accomplish this goal?

cp -R ~/important /media/usb

cp You want to copy the text from corysfile.txt to Corysfile.txt which of the following is a valid command to do this?

cp corysfile.txt Corysfile.txt

Which of the following commands provides a low-level way to install software on a Debian system?

dpkg

Which of the following text editors runs as a text-mode program when launched in text mode but also provides a GUI version for use in a GUI environment?

emacs

What Bash scripting keyword terminates a case statement?

esac

You're writing a script that will be called by other scripts. You want to signal abnormal termination of your script by passing a value of 8 to the external script under some circumstances. What command can you use in your own script to do this?

exit 8

Which of the following commands adds the directory /new/dir/ to the PATH environment variable?

export PATH=/new/dir: $PATH

Which of the following commands sorts the output of the command export-logs?

export-logs | sort

Which of the following commands will search for the file foo.txt under the directory /home?

find /home ""name foo.txt

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

for

Which of the following programs produces a summary of the memory status of your computer, including the total memory available, the amount used, and the amount that's unused?

free

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

grep change[ds] world.txt

Summarize the /dev directory

holds device files

Which command can be used to resolve a DNS name to an IP address?

host

Which of the following is an Alternative to the Man pages and provides support for Hyperlinking?

info

Which Linux command provides the information by displaying the names of files in a directory?

ls

You want to view permissions of all directories/files from the current directory in terminal, how can this be done easily?

ls -al

Which of the following commands will search the help files for anything containing the word cory?

man -k cory

Which of the following commands are used to get information on the proper use of ls?

man ls info ls

You want to create a directory called ~/Documents/papers, but you're not sure that the ~/Documents directory exists. What command can you type to create the desired directory and its parent directory if it doesn't already exist?

mkdir -p ~/Documents/papers

How can you rename files in Linux from terminal?

mv

Which of the processes can you use to identify running processes?

ps

What command can you use to retrieve user input into a variable in a Bash script?

read

Running the command rm Downloads leads to the following error: rm: cannot remove "˜Downloads/"™: Is a directoryWhich of the following commands can be used instead to remove Downloads, assuming Downloads is empty?

rmdir Downloads rm ""r Downloads

Which of the following outputs could stem from the command last?

root tty2 Wed May 17 21:11 - 21:11 (00:00)

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

rpm

What of the following permissions are set on the /tmp/ directory?

rwxrwxrwt

Which of the following commands should be used to compress more than two files?

tar

Which of the following commands supports both gzip and bzip2 compression?

tar

Which of the following commands creates an archive file work.tar from the contents of the directory ./work/?

tar ""cf work.tar ./work/

You want to archive cow.txt bird.txt and duck.txt and name the archive farm. which of the following are valid commands in order to do this?

tar -cvf farm.tar bird.txt cow.txt duck.txt

Which of the following syntaxes will you use to extract a file using the tar command?

tar -zxvf {.tgz-file}

You've received a tarball called data79.tar from a colleague, but you want to check the names of the files it contains before extracting them. Which of the following commands would you use to do this?

tar tvf data79.tar

What command can be used to view all processes running on a linux OS?

top

You modify the date of a specific file, which of the following commands allows for this?

touch -d "July 4 2020" specificfile.txt

What command adds the new user tux and creates the user"™s home directory with default configuration files?

useradd ""m tux

Which command would create a zip file containing the files holiday.tif and desc.txt and compress it as much as possible?

zip -9 trip.zip holiday.tif desc.txt

Which of the following characters summarizes a users home directory in Linux terminal?

~


Kaugnay na mga set ng pag-aaral

Related- Ch.5 Into to the Lodging Industry

View Set

Engage: Emergency Preparedness and Management

View Set

NUR 307 - Chapter 41: Nursing Care of the Child With an Alteration in Perfusion/Cardiovascular Disorder

View Set

AP European History Chapter 24 Test

View Set

MAN 3120 Chapter 5 Quiz Questions

View Set

SCM 470 - Process Fundamentals and Inventory Management Review

View Set

Immunostimulants and Immunomodulators (Chap 48)

View Set

Lesson 3: Perception and the Communication Process

View Set

theatre appreciation: chapter 11

View Set