• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 20 pages
Exam (elaborations)

Linux Essentials - Practice Exam Questions and Answers

Document preview thumbnail
Preview 3 out of 20 pages

If you wanted to disable a second network interface in Linux, what command would you enter at the shell? ifdown eth0 ifdown eth1 ifconfig disable eth1 ifdown - ANSWER ifdown eth1 You have been editing a configuration file using vi. You realize that you've made many mistakes and need to quit without saving the changes so that you can start over. Which command will allow you to do this? :q :q! :exit :s - ANSWER :q! ("colon Q Bang!") What directory would the ~ character represent? Another user's home directory. The home directory of our currently logged in user. Take us to the home directory of the root user. The /var directory. - ANSWER The home directory of our currently logged in user. What is the default shell for most Linux distributions? csh bash sh zsh - ANSWER bash You need to troubleshoot a hardware issue. Which command would let you view the kernel ring buffer to see what hardware was just added? cat /var/log/ tail lastlog dmsg | less head /var/log/messages - ANSWER dmsg | less (driver messages) "dmsg pipe less" Which of the following sections give a brief review of the syntax used for a particular command or utility within a man page? REVIEW SYNOPSIS SYNTAX DESCRIPTION - ANSWER SYNOPSIS In which directory could you add files so that a newly created user will automatically have them when they first log in? /etc/skel /etc/profile.d /etc/default /etc/.skel - ANSWER /etc/skel (correct?) Which of the following provides binary files containing prewritten code elements or interfaces that programmers can call when writing Linux programs? Libraries Bash shell profiles Kernel modules The kernel - ANSWER Libraries You are running the ping command to see if a particular host is up. How would you specify to the ping command that only five packets get sent to the remote host? ping --count 5 ping -c 5 ping 5 ping -n 5 - ANSWER ping -c 5 (-c = count, number of times can vary) You need to verify that a remote host with a hostname of is up and running. Which of the following commands would you enter at the shell prompt to do this? finger netstat -a netstat -s ping - ANSWER ping While using vi to edit a file in command mode, you try to use the BACKSPACE key to delete a word, but nothing happens. What's wrong? You need to use CTRL-BACKSPACE You need to reboot your computer. You need to switch to normal mode. You have to switch to insert mode. - ANSWER You have to switch to insert mode. Which command would uncompress the contents of the file '2'? gunzip (for .gz only) tar (this is not a zip-type file) bunnyzip2 (does not exist) bunzip2 *** bz2 is the key to this answer... use bunzip for bz files!!! - ANSWER bunzip2 gunzip (wrong!!!) it's for gzipped files (.gz) only, and tar does not provide compression on it's own. Bunnyzip2 is not a valid command (it's a typo!) How would you add a new user account to a system? useradd newguy new user newguy user add newguy groupadd newguy - ANSWER useradd newguy Which software development model is considered to be less structured than the others? Cathedral Bazaar Scrum Hierarchy - ANSWER Bazaar Which command in a script would display the text "hello world" to the screen, followed by a new line? print "hello world" printf "hello world" echo "hello world" display "hello world" - ANSWER echo "hello world" Which file(s) are used for DNS resolution? (Choose 2) /etc/dns /etc/hosts /etc/ /etc/resolve - ANSWER /etc/hosts /etc/ An application has the following permissions set on it: rw-r--r-- Yet it does not run. Why is that? 'Other" has read access to it There is no execute permission set The application is in the wrong directory The application is not in the $PATH - ANSWER There is no execute permission set What protocol is used by network programs/applications that need very low latency and, therefore, can tolerate a degree of unreliability? SMTP Internet Message Protocol User Datagram Protocol Transmission Control Protocol - ANSWER User Datagram Protocol - UDP is a 'connection-less' protocol and does not require an acknowledgement (no check for reliability) from the receiving end of the communication. Transmission Control Protocol (TCP) ?? NO!!!!! How would you set permissions on a newly created script so that it could be executed. chown u+x chmod u-x chmod u+x chown u-x - ANSWER chmod u+x +x means add execute -x means remove execute What is the proper syntax for creating a parent directory, followed by a child subdirectory? mkdir -r dir1/dir2 mkdir -c dir1/dir2 mkdir -p dir1/dir2 mkdir dir1/dir2 - ANSWER mkdir -p dir1/dir2 (make directory switch p [for parent] then parent name slash child name) You need to create a symbolic link from a file located at /usr/share/doc/manual to a link in your home directory named 'manual'. Which command would we use to achieve this? ln -s~/manual/usr/share/doc/manual ln -s/usr/share/doc/manual ~/manual ln ~/manual/usr/share/doc/manual ln /usr/share/doc/manual ~/manual - ANSWER ln -s/usr/share/doc/manual ~/manual (link -s [for symbolic] /usr/share/doc path, to home directory known as tilde /manual) While working in the command line console, not running X Windows, you suddenly need access to another shell to do another task. You don't want to quit or halt the current application. What might you do to run both your other functions in a shell while still running your current application? You can press ALT-F2 or CTRL-ALT-F2 to open an alternate console screen and access a new shell session. You can press CTRL-SHIFT-F6 to automatically open a new shell session without pausing your current running program. You can't do this. You will have to first quit the current program and then run your next task. You can press CTRL-PAUSE on your keyboard to pause the running program while we access the shell prompt. - ANSWER You can press ALT-F2 or CTRL-ALT-F2 to open an alternate console screen and access a new shell session. You need to search for man pages that relate to the Postfix service. Which command will do this? (Choose 2 correct answers) which postfix man -k postfix apropos postfix search postfix - ANSWER apropos postfix man -k postfix (you must be root to use this) Which directory contains filesystem management utilities such as cp or mv? /bin and /usr/bin


Document information

Uploaded on
September 9, 2022
Number of pages
20
Written in
2022/2023
Type
Exam (elaborations)
Contains
Questions & answers
$11.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
millyphilip
3.7
(561)
Sold
3008
Followers
1964
Items
47539
Last sold
2 days ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions

Whoops! We can’t load your doc right now. Try again or contact support.