linux

Ace your homework & exams now with Quizwiz!

A ____ partition is used to temporarily store stuff from RAM when RAM is full. ext4 bios ntfs swap

d

A nested command is a command that: is waiting for its turn to "hatch" redirects the output to a new command runs automatically at a regular date and time runs inside of another command

d

In vim which of the following commands deletes the current character? xx d dd x

d

Occasionally an systems administrator will want to watch for log entries as they occur. Which command will provide you with a "live" watch of a log file? view logfile.txt top logfile.txt watch logfile.txt tail -f logfile.txt

d

Using symbolic mode how would you give a directory permissions so that users, groups, and others could access it and read the contents. chmod u=rx,go=r chmod ug=rx,o=rw chmod 544 dir chmod ugo=rx dir

d

What command lets you see the inodes along with the file list in your current directory? find -inode . ls -l df -i ls -lai

d

What does the following command do: find /home/sally -mmin -10 Finds all files that have a maximum size of 10 that are located in /home/sally Finds all files that have a minimum size of 10 that are located in /home/sally Finds all files that have the metadata changed more than 10 minutes ago located in /home/sally Finds all files that have been text modified in the last 10 minutes located in /home/sally

d

What is one main objective of the GNU Public License? The GNU foundation receives a royalty fee from any future sales Any proprietary licensing must be approved by GNU GNU will own the copywrite of any software developed under the license Correct! Anyone may have access to the source code

d

What is the highest number of primary partitions you can have? 2 1 3 4

d

What will the following command display? echo "bananas oranges grapes peaches " | awk '{ print $0 }' bananas grapes Nothing at all bananas oranges grapes peaches peaches oranges

d

When a user is deleted, what happens to files owned by that user? The new file owner is Root The files are assigned ownership to the next user in the group The files are also deleted The file ownership is listed as the deleted user's UID

d

When you ssh to a new computer, you will be warned that the authenticity of the host can't be established. When you confirm the connection this information is stored in which file? ssh_copy_id network_interfaces authorized_keys known_hosts

d

Which command would you use to extract myfiles.tar? untar -xf myfiles.tar untar myfiles.tar tar -xcf myfiles.tar tar -xf myfiles.tar

d

Which of the following can NOT be used to turn off a computer? reboot shutdown poweroff! turnoff

d

Which of the following commands will display the last 20 lines of a file named log.txt tail 20 log.txt cat log.txt | count 20 head -n 20 log.txt tail -n 20 log.txt

d

Which of the following commands will terminate a process by using the process name instead of id? terminate kill squelch killall

d

Which of the following does NOT require a working internet connection to run successfully? apt update wget http://cit.dixie.edu/it/1100/files/linux_text.pdf apt install man mkdir

d

Which of the following is NOT a way of making a member of the sudo group? use the visudo command Directly edit /etc/group and add the user to the appropriate line. use the addgroup command use the chown command

d

Which of the following statements are NOT true regarding the following command? find /etc -name "*hosts*" 2>/dev/null > files.txt The /etc directory will be searched The paths of files that contain the name "hosts" will be written to files.txt Errors are discarded Found files will be written to /dev/null

d

Which of the following terms does vim use instead of 'cut'? yank scissor remove delete

d

Who founded the GNU project (do you k-now this?) Linus Torvalds Steve Jobs Stephen Borne Richard Stallman

d

Assume that I have typed the following at a terminal and that my current working directory is /home/robert : $ alias p='pwd' This command will be available on other terminals and even available after I restart my machine. T or F?

F

Which environment variable provides the current timezone?

TZ

Assume that I have set my prompt environment variable to the following: "`ps ax | wc -l`: \u@\h $ " Which of the following statements is true? The @ sign will change to the # for the root user. When becoming the root user the # will be displayed. The username is always at the end of the prompt. The prompt will continually update to reflect new processes.

The prompt will continually update to reflect new processes.

A user types `ls` and is given the output of the `who` command. Which of the following could describe why this occured?

The user has defined an alias for the ls command.

After executing the shutdown command a message is sent to all logged in users warning them of the event. True False

a

After running an 'apt-get update' on your system you must run another command such as 'apt-get upgrade' to actually install the new updates. True False

a

Analyze the following command and then answer the question: scp /tmp/sample.txt [email protected]:./files/new.txt What host is this copied to? tangum.cs.dixie.edu :./files/new.txt fred localhost

a

Assuming you have a file called 'foo.gz' , which of the following programs would best uncompress it? gunzip 7z unzip tar

a

Consider the command: locate myfiles.txt Which file would NOT show in the results? Myfiles.txt /myfiles.txt ~/stuff/myfiles.txt /var/temp/myfiles.txt

a

Consider the following file named csv.txt: jsmith,14,4.0 cwherry,15,3.2 hcampbell,16,3.5 Which command will sum the second and third columns for each row? awk -F"," '{print $2+$3}' csv.txt awk -F"," '{print $2}' csv.txt + awk -F"," '{print $3}' csv.txt awk '{print $2+$3}' csv.txt awk '{print $2}' csv.txt + awk -F '{print $3}' csv.txt

a

Heather's boyfriend, Ralph, is smitten with her. He emails her love letters regularly. Heather lovingly tells him that she redirected all his emails to /dev/null for safe keeping. How does Heather feel about Ralph? She despises him. She wants to introduce Ralph to mother. She anticipates a long relationship with Ralph. She wants to go bowling with him.

a

In vim which of the following commands takes you to the last line of the file? G $ E 0

a

Multiple users can be logged into a single linux system at the same time. True False

a

The GUI install has multiple choices for front end desktop environment. KDE and Gnome are two of these choices. True False

a

The command sudo apt upgrade installs newer versions of the packages you have. True False

a

The reason we use list two DNS servers is In case one of them stops working In case we want to increase our internet access speed Because one is for outgoing signals and the other is for incoming signals Because it takes two DNS servers to hold all the information

a

This HIGH level utility creates a new user and sets up the new user's home directory: adduser usernew useradd newuser

a

What do you type in command mode to save the file in vim? :w ctrl+s :s ctrl+o

a

What is the general term for a customized Linux OS comprised of the Linux kernel, GNU tools and libraries? Linux Distribution Minux Red Hat GNU Linux

a

Which command adds the user ralph to the plumbers group using a HIGH level utility? addgroup ralph plumbers groupadd ralph plumbers groupmod ralph plumbers usermod ralph plumbers

a

Which command adds the username harry to the group called hogwarts? addgroup harry hogwarts adduser hogwarts harry chmod hogwarts harry addgroup hogwarts harry

a

Which command shows the directory you are in? pwd dir ls show

a

Which command will list all the processes running on the system, including the username and PID ? ps aux top pstree ps

a

Which command will list the parent and the child process relationships? pstree ps -aux top ps

a

Which of the following best describes the result of this command: find /tmp/dir1 -name fun.txt Find all files named fun.txt and found in /tmp/dir1 Find all files that are named fun and found in /tmp/dir1 Find all files that are named fun.txt Find all files that are named fun

a

Which of the following commands could correctly install the program 'apache2' as a super user. (Choose the MOST correct) sudo apt-get install apache2 apt-cache search apache2 sudo apt-cache search apache2 apt-get install apache2

a

Which of the following is NOT a reason to learn a text based editor A file created in a Text based editor cannot be opened in a GUI editor. When logged into a CLI system a GUI editor is not available. You can use a terminal in a CLI and GUI based system. Vi comes pre-installed in CLI and GUI.

a

Which of the following is what we learned about an SSH tunnel? It allows us to to connect GUI based programs through the network firewall. It is packets that flow in a stream It is an underground passageway It is something we should never use

a

Which of the following regular expressions will match a single character. . + * 0

a

Which of the following will NOT allow the user joe to login to the scratch machine from on campus, assuming that he is currently logged in as joe: ssh joe.scratch.cs.dixie.edu ssh scratch.cs.dixie.edu ssh joe@scratch ssh scratch

a

Which of the following will appropriately print every other line of a file? sed -n '1~2p' < file.txt sed -n '1~2p' > file.txt sed -n '2p' < file.txt sed -n '2p' > file.txt

a

Which program allows a user to securely remote into a headless configuration? ssh VNC telnet ichabod

a

Who originally owned the Unix trademark? AT&T Steve Jobs Microsoft Linux

a

You can run out of inodes before you run out of disk space. True False

a

You can ssh into a GUI linux machine that has openssh-server installed. True False

a

Your Linux system has four Firefox processes running. Their PIDs are 1234, 1456, 7891, and 2345. For whatever reason, Firefox is not responding. How can you stop and remove all Firefox processes with one command? killall -9 firefox kill -9 1234, 1456, 7891, 2345 remove -9 1234, 1456, 7891, 2345 kill -9 firefox

a

______ is the act of connecting a filesystem or partition to a directory in the root partition. mounting mkfs formatting booting

a

Which command lists the currently active aliases for your system?

alias

A GUI-based text editor like GVIM can also be used on a headless (CLI) install of Linux. True False

b

Analyze the following command and then answer the question: scp /tmp/sample.txt [email protected]:./files/new.txt The source file, /tmp/sample.txt, no longer exists after the command is executed. True False

b

Android runs a MS Windows kernel. You Answered True False

b

Assuming the file foo.txt contains the following: 1 sharecroppers 2 storey 3 forestalled 4 snatching 5 algae What will the following command display? cat foo.txt | awk '/^1/ { print }' Line 5 The line that starts with 1 Nothing All the lines

b

Closing the VNC Viewer turns off our Virtual Machine. True False

b

Consider the command: cat file1.txt | grep Linux What will be displayed? Any line inside file1.txt that contains linux Any line inside file1.txt that contains Linux An error All the lines inside file1.txt

b

Fred wants a list of games available to install from the repository. What command helps him out? sudo apt install games sudo apt search games sudo games apt sudo apt update games

b

How does Linux manage log files so they do not get too large and unwieldy? Log files stop recording information Log files are frequently rotated and archived. Log files are periodically erased Log files abbreviate their information more as the file gets larger

b

Linux is a close-cousin to which OS? DOS UNIX Windows Mac OS

b

Open-SSH was installed by default by the GUI installation. True False

b

Suppose you have created a new application 'myapp', and copied it to the directory '/usr/local/bin'. You would like all the users of the system to be able to run your application. Which of the following command lines would allow the appropriate access? umask 0022 /usr/local/bin/myapp chmod o+x /usr/local/bin/myapp chown 755 /usr/local/bin/myapp chgrp bin /usr/local/bin/myapp

b

The command below will put file3.txt in tom's home directory on news.dixie.edu. joe@joebuntu:~$ scp file3.txt news.dixie.edu:. True False

b

The seventh partition on your first SCSI disk would be referred to as ____ in Linux. /dev/sdb7 /dev/sda7 /dev/sdc7 /devil

b

To redirect standard error, which of the following lines could work? ls > /dev/null ls 2>/dev/null ls >> /dev/null ls 3>/dev/null

b

Using scp, you can only copy from a local machine to a remote machine, not the other way around. True False

b

What will be stored in file.txt after the following command is executed? echo "hello" > file.txt date >> file.txt hello hello followed by the output of the date command Nothing the output of the date command

b

What will the following command display? echo "bananas oranges grapes peaches " | awk '{ print $3 }' bananas grapes oranges peaches

b

Which file contains group information? ~/group /etc/group /home/group /sys/group

b

Which of the following cannot be used to view the contents of a file? more find less cat

b

Which of the following commands is usually used to exit vim? :leave :q :set quit :exit

b

Which of the following regular expressions will match all words that do not start with an a, b, or c. ^[abc]$ ^[^abc] [abc] abc$

b

Which of the following statements is true about the following cron entry: m h dom mon dow command */5 * * * * echo "this is my fun cron command" >/dev/null The command will run at 5 minutes past every hour This command will run every 5 minutes The command is redirected to standard out. The command will run only on one day per month

b

Which of the following statements is true about this cron entry: m h dom mon dow command 10 3 10 * * echo "this is my fun cron command" >/dev/null this command will run every 10 minutes This command will run on one day per month This command will run hourly This command will run daily

b

Which of the following statements is true? Linux is a proprietary system. BSD Unix was the first commercial version of Unix. Redhat makes Ubuntu. Steve Jobs is alive.

b

Which utility does NOT compress the archive? zip tar bzip2 gzip

b

You can legitimately run OSX on non-apple hardware. True False

b

You have Apache2 web server running on your Linux machine. Where would you look for the Apache log files that would help you diagnose problems? /var/log/application/apache2 /var/log/apache2 /var/log/syslog /var/log/auth/apache2

b

You wish to delete a line in vim. Which vim mode allows you to efficiently do this? insert mode command mode fill mode execute mode

b

A Computer Network is a group of computers that the net fisherman use to find fish do nothing except catch butterflies all day have set permissions to talk to each other that stay isolated and won't connect to computers outside their network.

c

Assuming the file foo.txt contains the following: 1 sharecroppers 2 storey 3 forestalled 4 snatching 5 algae What will the following command display? cat foo.txt | awk '/ll/ { print $1 }' All the lines Nothing A number A word

c

BASH stands for: Be Against Shells Born Again Shell Bourne Again Shell Be Angst Shell

c

How do you make a mount reload every time your restart your computer (persist)? put an entry in /etc/mount mount /dev/sda3 /mnt put an entry in /etc/fstab mkdir mount

c

Look at the following output generated by the 'ls -l' command. 361 drwxr-x--- 12 bob bob 4096 Apr 6 14:35 subdir How many directories likely exist inside of subdir? 12 11 10 9

c

This LOW level utility adds a new user and is often used in scripting: usernew newuser useradd adduser

c

What command will display all files in your current directory as well as any subdirectories? cat | tree ls -l tree ls . .. ...

c

What command would you use to change the ownership of a directory? chgrp chdir chown changeown

c

Where do most log files reside on a Linux computer? /usr/log /home/logging /var/log /etc/logging

c

Where do most log files reside on a Linux computer? /usr/log /home/logging /var/log /etc/logging

c

Which is NOT a text editor in Linux? vim nano cat emacs

c

Which of the following best defines `grep`? switch user list files in a directory displays matching lines to a search string (text) search for logged in users

c

Which of the following commands will access the metadata of an inode? df mv stat who

c

Which of the following commands will correctly locate all files that are found in /var/log that end with '.txt' and that are larger than 5 megabytes. find /var/log -name "*.txt" +5 find /var/log -name "*.txt +size -5M find /var/log -name "*.txt" -size +5M find /var/log .txt +5

c

Which of the following commands will remotely connect to a machine called 'isengard.lotr.com' as always the user 'gandalf'? ssh isengard.lotr.com@gandalf ssh isengard.lotr.com ssh [email protected] ssh gandalf>isengard.lotr.com

c

Which of the following is not a function of the Linux kernel? Enabling programs to use a network TrueAllocating memory for use by programs Allocating CPU time for use by programs Creating menus in GUI programs Controlling access to the hard disk

c

Which of the following regular expressions will match all files that start with an 'a' and end with a 'pdf'. a^pdf$ a.*pdf$ ^a.*pdf$ $a.pdf$

c

Which shortcut allows you to view your command history in the shell? Backspace <tab> key history down arrow

c

Who is generally considered the founder of Linux? Bill Gates AT&T Linus Torvalds Steve Jobs

c

You are looking for a directory named grades off your home directory. This directory would have been created within the last 12 hours. What command will best help you find it? find ~ grades find ~ -name grades -type f find ~ -name grades -type d find grades

c

This command prints all or part of the environment variables:

printenv

Identify the user's personal startup file where the user may customize configuration scripts such as aliases and prompts.

~/.bashrc

Which of the following environment variables controls your prompt?

$BASH

Which of the following environment variables would contain the path where the executable file cowspeak would be located?

$LS

Assume the following prompt string: "\e[0;35m[\u\e[m\e[1;34m@\h \e[m\e[1;37m\w]\$ \e[m " How many different colors will the prompt be in?

3


Related study sets

English File Beginner Common verb phrases 2

View Set

RN Live Review Pharmacology 2019

View Set

Terminologies Part 2 CONSTRUCTION METHODS AND MANAGEMENT

View Set

Microeconomics Chapter 10 Review

View Set

REGLAS Y REGULACIOES DEL HOGAR CUIDADO DE NINOS INFANTIL Y FAMILIAR (HOME)

View Set

FBLA Computer Problem Solving (TYPES OF PRINTERS)

View Set

Module 4: Oral and Topical Medications

View Set