Red Hat Linux Essentials v6.1

Page:    1 / 11   
Exam contains 153 questions

You work as a Network Administrator for Perfect Solutions Inc. The company has a Linux- based network. You want to view the status of the current processes running on a Linux computer. You also want to append this information into the StatPro.txt file without deleting its content. Which of the following commands will you use to accomplish the task?

  • A. ps StatPro.txt
  • B. ps >> StatPro.txt
  • C. ps | more StatPro.txt
  • D. ps > StatPro.txt


Answer : B

Explanation:
The ps command reports the status of processes that are currently running on a Linux computer.
What is >> command?
The >> command is used for storing the output generated by different commands. It creates a file specified to store the output. If the specified file already exists, it appends that file.

When you remove a user account from your Linux system, the files and directories of this user may still remain on the system. Which of the following commands can you use to remove all items from your Linux system?
Each correct answer represents a complete solution. Choose two.

  • A. userdel -r
  • B. userdel -f
  • C. userdel -h
  • D. userdel -c


Answer : A,B

Explanation:
When a user account is removed from a Linux system with the userdel command, the user account would get removed but some files and directories of that user may still remain on the system. To remove all items, the -r option is used with the userdel command.
The -f option forcibly removes the user account even if the user is still logged in. It also forces userdel to remove the user's home directory or his mail spool even if another user uses the same home directory or if the mail spool is not owned by the specified user.
Answer option C is incorrect. The -h option with the userdel command displays help messages and then exits.
Answer option D is incorrect. This command is incorrect. The -c option is not used with the userdel command.

You work as the Network Administrator for Perfect solutions Inc. The company has a Linux- based Network. You are a root user on the Red Hat operating system. You want to grant ownership of the file foofile to a user John. Which of the following commands should you use to accomplish this task?

  • A. chown John foofile
  • B. chmod John foofile
  • C. chgrp foofile John
  • D. chown foofile John


Answer : A

Explanation:
This is the correct syntax for granting ownership of foofile to John.
What is the chown command?
The chown command is used to change the ownership of a file. Only root can change the ownership of a file. The chown command can be used with the -R option to recursively change the ownership of an entire directory tree.
Syntax:
chown [-R] newowner filename
Answer option B is incorrect. The chmod command is used to change access mode for files and directories.
Answer option D is incorrect. The syntax of this command is not correct. With chown, first write the name of the user whom you want to give ownership, then write the filename of the file whose ownership you want to change.
Answer option C is incorrect. The chgrp command is used to change Group-ownership not file ownership.

Which of the following cp command parameters copies only when the source file is newer than the destination file or when the destination file is missing?

  • A. -u
  • B. -l
  • C. -p
  • D. -s


Answer : A

Explanation:
The cp -u command copies only when the source file is newer than the destination file or when the destination file is missing.
Answer option C is incorrect. The cp -p command copies the files from source to destination with preserving file attributes, such as timestamps, mode, and ownership.
Answer option B is incorrect. The cp -l command links files from source to destination instead of copying.
Answer option D is incorrect. The cp -s command makes symbolic links instead of copying.

Which graphical mail client is the default tool for email and groupware in Red Hat
Enterprise Linux?

  • A. mutt
  • B. Evolution
  • C. Thunderbird
  • D. pidgin


Answer : B

Explanation:
The default tool for email and groupware in Red Hat Enterprise Linux is called Evolution.
Evolution provides not only the email access, but also the ability to maintain a calendar, tasklist and contacts database.
What is Evolution?
Evolution is a full-featured personal and workgroup information management tool for Linux systems, and is the default email client for Red Hat Enterprise Linux. It provides all of the standard email client features, including powerful mailbox management, user-defined filters, and quick searches. Its additional feature is a flexible calendar/scheduler, which allows users to create and confirm group meetings and special events online.
Answer option C is incorrect. Thunderbird is a graphical mail client that offers email, Usenet and rss support but it does not support groupware features. Thunderbird is provided along with Firefox and others as part of the Mozilla suit of application.
What is groupware?
Groupware refers to programs that help users work together collectively while located remotely from each other.
Groupware services can include the sharing of calendars, collective writing, e-mail handling, shared database access, electronic meetings with each user able to see and display information to others, and other activities. Sometimes called collaborative software, groupware is an integral component of a field of study known as Computer-
Supported Cooperative Work or CSCW.
Answer options A and D are incorrect. The mutt and pidgin are Non-GUI mail clients.
What is mutt? mutt is a powerful tool for managing email within a text-only environment.
This tool is very important to access email even when a graphical interface is not available.
Some of its strengths are handling of message threads and flexibility. When mutt sees a series of related messages, it displays each reply under the parent. mutt supports sending of attachments through a mail. The following example describes how a file can be attached to a mail: echo "Sending an attachment." | mutt -a backup.zip -s "attachment" [email protected]
This command will send a mail to [email protected] with the subject (-s) "attachment", the body text "Sending an attachment.", containing the attachment (-a) backup.zip.
What is Pidgin?
Pidgin is a multi-protocol Instant Messaging client that allows a user to use all of his IM accounts at once. It is a free software that can work with AIM ,Gadu-Gadu, Jabber, ICQ
,IRC, MSN, SILC, XMPP, Yahoo!, and Zephyr Network. Anyone is
free to use it and modify it, but if a user distributes his modifications, he must distribute the modified source code as well.
The license of this communication software is Freeware, i.e. anyone can freely download and use this communication software.

Fill in the blank with the appropriate permission to complete the statement below.
The___________command is used to start xsession using the xinit utility.

  • A. startx


Answer : A

Explanation: xinit is a program that allows a user to manually start an X server. The startx script is a front-end for xinit. By default, xinit and startx start an X server on display :0 and then start an xterm on it. When the xterm terminates, xinit and startx kill the X server. In general, xinit and startx can start an arbitrary server and run an arbitrary script. Typically, this script runs a number of programs and a window manager. Arguments immediately following the startx command are used to start a client in the same manner as xinit. For example the startx -
- -dpi 100 command starts the xsession with 100 dpi.

Which of the following network diagnostic tools is NOT used in the Linux operating system?

  • A. host
  • B. dig
  • C. ipconfig
  • D. ping


Answer : C

Explanation:
The ipconfig network diagnostic tool is used in the Windows operating system to see IP addresses and MAC addresses, and other related information. It is not used in the Linux operating system. In the place of the ipconfig utility, ifconfig is used in Linux for performing the same task.
Answer option D is incorrect. The ping utility is a network diagnostic tool that checks
TCP/IP connectivity on any host. It is used in both Linux and Windows operating systems.
What is the ping utility?
The ping command-line utility is used to test connectivity with a host on a TCP/IP-based network.
This is achieved by sending out a series of packets to a specified destination host. On receiving the packets, the destination host responds with a series of replies. These replies can be used to determine whether or not the network is working properly.
Answer option A is incorrect. This is a network diagnostic tool in Linux that perform hostname to IP address translation and vice versa.
Answer option B is incorrect. This is a network diagnostic tool in Linux which is used to perform hostname to IP address translations, and vice versa in greater detail.

Which shell script is the first startup script run when a login shell is started in Linux?

  • A. ~/.bashrc
  • B. /etc/profile.d
  • C. /etc/profile
  • D. /etc/bashrc


Answer : C

Explanation:
The /etc/profile shell script is the first startup script run when a login shell is started. It runs only for the login shell.
What is a Login shell?
A login shell is a shell that is started by login into the system. The login shells' responsibility is to start the non-login shell and to make sure that environment variables are set so as to ensure that a user can get all the default parameters needed at start-up.
Login shell will set the PATH environment variable, TERM, the UID and GID of the terminal amongst other things. These are the requirements in order to work proficiently. Additionally, the login-shell will set default variable such as USERNAME,
HISTSIZE, HOSTNAME, HOME, etc.
Answer option A is incorrect. The ~/.bashrc shell script is the first startup script run when a non-login shell is started.
A non-login shell is a shell started by a user or a program issuing the bash command.
Some non-login shells are as follows:
su
graphical terminals
executed scripts
any other bash instances
Answer options D and B are incorrect. The non-login shells first call ~/.bashrc. The
~/.bashrc calls
/etc/bashrc, and then /etc/bashrc
calls /etc/profile.d.

Which of the following commands is used to set down the interface and flush all its addresses?

  • A. ifup
  • B. ifdown
  • C. ifconfig
  • D. down


Answer : B

Explanation:
The ifdown command is used to set down the interface and flush all its addresses. It is possible to let ifdown check the interface if the interface is still used before setting it down. If the interface is used it may then discard the using processes or refuse setting it down.
To enable this feature, check /etc/sysconfig/network/config file.
Answer option A is incorrect. The ifup command is used to bring up a preconfigured interface for networking. It is usually invoked by the network script at boot time or by the
PCMCIA/hotplug system. It can also be used to start interfaces manually on the command line. It activates the link, adds addresses and other parameters and sets up the routes for an interface.
Answer option C is incorrect. The ifconfig commands displays the basic settings of a network device.
Answer option D is incorrect. There is no such command as down.

You work as the Network administrator for McNeil Inc. The company has a Linux-based network. You are working as a root user on the Linux operating system. You have created a PostScript file on your system. You want to convert this file to a PDF file. Which of the following commands should you use to accomplish the task?

  • A. ps2pdf
  • B. evince
  • C. pdf2ps
  • D. enscript


Answer : A

Explanation:
The ps2pdf utility is used to convert PostScript to a PDF file.
What is a ps2pdf command?
The ps2pdf command creates PDF files. It is used to convert a PostScript file to a PDF file.
There are a number of versions of this program, some are as follows:
Answer option D is incorrect. The enscript utility converts a text to a PostScript format and sends it to a file or the print queue.
Answer option B is incorrect. The evince utility is used to view a PDF file, not to create a
PDF file.
What is the evince command?
The evince command is a document viewer capable of displaying multiple and single page document formats such as PDF and Postscript.
Syntax: evince [Options] [Filename]


You work as a Network Administrator for McNeil Inc. The company has a Linux-based network. You are a root user on the Red Hat operating system. You want to see all directories and files, including hidden files of your home directory in long listing format.
Which of the following command-line utilities would you use to accomplish this task?

  • A. ls -al /root
  • B. ls
  • C. ls -s /root
  • D. ls -h /root


Answer : A

Explanation:
The ls -al /root command lists all the files and directories, including hidden files in the /root directory, in long listing format. /root is the root user's home directory.
What is the ls command?
The ls command is used to list files on a Linux computer. The syntax of the ls command is as follows: ls [option] [directory name]
Several options are used with the ls command. Following is a list of some important options:
For example, the following command displays all the files (including hidden files) in the
/home
directory and the contents in
the subdirectories:
ls -aR /home
Answer option B is incorrect. The ls command without arguments lists the file and directory names in the current directory.
Answer option C is incorrect. The ls -s /root command shows the size of all files and directories (in blocks, not bytes) that reside in the /root directory.
Answer option D is incorrect. The ls -h /root command shows the size of files and directories in
"human readable format" (i.e. 19M, 3G, etc).
Answer option C is incorrect. The pdf2ps utility is used to convert a PDF file to a PostScript.

You work as the Network Administrator for McNeil Inc. The company has a Linux-based network.
You are working a root user on the Red Hat operating system. You want to search for files named snow.html, Snow.html, SNOW.html in the current directory. Which of the following commands should you use to accomplish the task?

  • A. find -iname snow.html
  • B. find -name snow.html
  • C. find name snow.html
  • D. find -i snow.html


Answer : A

Explanation:
If no path is given, find looks in the current directory and its subdirectories. Using the -i option tells the find command to perform caseinsensitive search for files named snow.html.
It will show all files named snow.html, Snow.html,
SNOW.html in the current directory.
Answer option B is incorrect. This command will only search for files named snow.html in the current directory with case-sensitiveness. It will not search for those files named
Snow.html, SNOW.html.
Answer option C is incorrect. This is an incorrect command; it will show an error message.
Answer option D is incorrect. This is also an incorrect command, there should be a name after -i in the command.

Which of the following commands is used to make traceroute wait 5 seconds for a response to a packet?

  • A. traceroute -w
  • B. traceroute -T
  • C. traceroute -q
  • D. traceroute -r


Answer : A

Explanation:
The traceroute -w command is used to make traceroute wait 5 seconds (default) for a response to a packet.
What is traceroute?
Traceroute is a route-tracing utility that displays the path an IP packet takes to reach its destination.

It uses Internet -
Control Message Protocol (ICMP) echo packets to display the Fully Qualified Domain
Name (FQDN) and the IP address of each gateway along the route to the remote host.
Traceroute sends out a packet to the destination computer with the TTL field value of 1.
When the first router in the path receives the packet, it decrements the TTL value by
1. If the TTL value is zero, it discards the packet and sends a message back to the originating host to inform it that the packet has been discarded. Traceroute records the IP address and DNS name of that router, and sends another packet with a TTL value of
2. This packet goes through the first router, and then times out at the next router in the path. The second router also sends an error message back to the originating host. Now, the process starts once again and traceroute continues to send data packets with incremented TTL values until a packet finally reaches the target host, or until it decides that the host is unreachable. In the whole process, traceroute also records the time taken for a round trip for each packet at each router.
Answer option B is incorrect. The traceroute -T command uses the TCP/SYN packets for probing.
Answer option C is incorrect. The traceroute -q command sets the number of probe packets per hop.
The default value is 3.
Answer option D is incorrect. The traceroute -r command bypasses the normal routing tables and sends the probe packet directly to a host on an attached network. If the host is not on a directly-attached network, an error is returned. This option can be used to ping a local host through an interface that has no route through it.

Which of the following directories cannot be placed out of the root filesystem?
Each correct answer represents a complete solution. Choose all that apply.

  • A. /sbin
  • B. /etc
  • C. /lib
  • D. /var


Answer : A,B,C

Explanation:
The following directories cannot be separated from the root filesystem:
/lib
/dev
/etc
/sbin
/bin
Answer option D is incorrect. /var can be separated from the root filesystem. Such filesystems are known as optional filesystems. Some of the optional filesystems are as follows:
/var
/usr
/opt
/home

You work as a network administrator for company Inc. The company has a Linux-based network. You want to create a file named foobar.zip and put it into a directory named filesdir. Which of the following commands will you use to accomplish the task?

  • A. unzip foobar.zip filesdir
  • B. zip -r foobar.zip filesdir
  • C. tar -tvf foobar.tar
  • D. gunzip foobar.zip


Answer : B

Explanation:
The zip -r foobar.zip filesdir command is used to create a file named foobar.zip and put it into the directory named filesdir. foobar.zip represents the file you are creating and filesdir represents the directory you want to put in the new zip file. The -r option specifies that you want to include all files contained in the filesdir directory recursively.
Answer option A is incorrect. The unzip foobar.zip command is used to extract the contents of a zip file to the filesdir directory.
Answer option D is incorrect. The gunzip foobar.zip command is used to expand the compressed file.
Answer option C is incorrect. The tar -tvf foobar.tar command is used to list the contents of a tar file.

Page:    1 / 11   
Exam contains 153 questions

Talk to us!


Have any questions or issues ? Please dont hesitate to contact us