1Z0-409 Oracle Linux Fundamentals Practice Exam Set 3

The user smith is asked to replace all occurrences of the letter "e" with the letter "y" in file1.txt and
save the output to fix.txt. Which command would let the user smith do so? (Choose all that apply.)
A. sed s/e/y file1.txt > fix.txt
B. sed /y/e/g file1.txt > fix.txt
C. sed s/e/y/g file1.txt > fix.txt
D. sed /y/e/g file1.txt > ./fix.txt

The user smith is asked to replace all occurrences of the letter "e" with the letter "y" in file1.txt and
save the output to fix.txt. Which command would let the user smith do so? (Choose all that apply.)
A. sed s/e/y file1.txt > fix.txt
B. sed /y/e/g file1.txt > fix.txt
C. sed s/e/y/g file1.txt > fix.txt
D. sed /y/e/g file1.txt > ./fix.txt
E. sed s/e/y/g < file1.txt > ./fix.txt


E. sed s/e/y/g < file1.txt > ./fix.txt


Options are :

  • A,E
  • D,E
  • B,E
  • C,E (Correct)

Answer : C,E

You have issued the following command:
echo -e welcome\nTo Oracle\nEnterprise\rLinux
What would be the impact of -e switch on the echo command?


Options are :

  • It honors the escape sequence only for the first new line character
  • It honors the escape sequence only for the two new line characters.
  • It honors the escape sequence for both the new line characters and carriage return (Correct)
  • It honors the escape sequence only for the second new line character
  • It honors the escape sequence only for the carriage return.

Answer : It honors the escape sequence for both the new line characters and carriage return

The user smith on station1 is trying to use sftp to transfer some files to and from stationX, and
receives an error message as shown below:
[smith@station1 ~]$ sftp stationx
Connecting to stationX...
root@stationX's password:
request for subsystem 'sftp' failed on channel 0
couldn't read packet: Connection reset by peer
[smith@station1 ~]$
How would you resolve the issue?


Options are :

  • Restart the xinetd service on stationX with the gssftp service enabled.
  • Restart the sshd service on stationX with the IgnoreRhosts parameter set to no in /etc/ssh/sshd_config.
  • Restart the sshd service on stationX with /usr/bin/sftp enabled as the subsystem parameter in /etc/ssh/sshd_config.
  • Restart the sshd service on stationX with /usr/libexec/openssh/sftp-server enabled as a subsystem parameter in the /etc/ssh/sshd_config file (Correct)

Answer : Restart the sshd service on stationX with /usr/libexec/openssh/sftp-server enabled as a subsystem parameter in the /etc/ssh/sshd_config file

echo "Good\nMorning\nSmith"
You find the two newline characters in the output and do not want them to appear in the output.
Which two among the following would help you achieve this task without effecting the content of
echo command? (Choose two.)
A. echo -e "Good\nMorning\nSmith"
B. echo -n "Good\nMorning\nSmith"
C. echo -E "Good\nMorning\nSmith"
D. echo -ne "Good\nMorning\nSmith"
E. echo -nE "Good\nMorning\nSmith"
F. echo -eE "Good\nMorning\nSmith"


Options are :

  • A,B
  • A,E
  • A,C
  • A,F
  • A,D (Correct)

Answer : A,D

You have the /home/ file system on server1 exported through NFS. You have a fresh installation of
Linux on a workstation and want to setup the workstation to mount and unmount the /home/
filesystem automatically.
Which default configuration files on the workstation would you edit to achieve this task?


Options are :

  • Edit only the /etc/auto.master file.
  • Edit only the /etc/auto.home file
  • Edit the /etc/fstab file.
  • Edit both the /etc/auto.home and /etc/auto.master files. (Correct)
  • Edit the /etc/inittab file

Answer : Edit both the /etc/auto.home and /etc/auto.master files.

What happens when you execute the lpq command without passing any arguments


Options are :

  • It removes all the jobs available in the default queue
  • It removes the jobs available in all the available queues
  • It lists the jobs in all the available queues
  • It lists all the jobs in the default queue (Correct)

Answer : It lists all the jobs in the default queue

Match the directories with their contents.
1. BUILD/ a. contains pristine source tarball as well as any patches and other ancillary files
2. SOURCES/ b. contains the package.spec file that describes and controls RPM build
3. RPMS/ c. source tarball is extracted, patches applied, and compilation takes place
4. SPECS/ d. freshly built binary RPMs placed in these directories


Options are :

  • 1-c, 2-d, 3-b, 4-a
  • 1-d, 2-c, 3-b, 4-a
  • 1-d, 2-b, 3-a, 4-c
  • 1-c, 2-a, 3-d, 4-b (Correct)

Answer : 1-c, 2-a, 3-d, 4-b

Which two statements are true about the su command? (Choose two.)
A. Switching from super user to super user requires a password.
B. Switching from super user to normal user requires a password.
C. Switching from normal user to super user requires a password.
D. Switching from super user to normal user does not require a password.
E. Switching from normal user to normal user does not require a password


Options are :

  • A,B
  • C,D (Correct)
  • B,C
  • A,D

Answer : C,D

As smith you have logged in to the system at the tty1 terminal and issued the following command
to make the top command run in the background.
[smith@station2 ~]$ top&
You exit from the terminal and log back again in to the system at the same terminal. How is the
background job affected?


Options are :

  • The background job starts running in the background again as soon as smith logs in to the system
  • The background job is deleted from the job pool and does not get listed using the jobs command (Correct)
  • The background job gets into the foreground as soon as smith logs in to the system.
  • The background job will not be affected.

Answer : The background job is deleted from the job pool and does not get listed using the jobs command

Which three statements are true about tunneling an application through ssh? (Choose three.)
A. Tunneling works by port forwarding.
B. Only one port could be forwarded at a time
C. Tunneling works only if the remote host runs an X server.
D. Tunneling works only if the remote host runs an ssh server.
E. All requests aimed at the local port are forwarded to the remote port via ssh and thus
encrypted.


Options are :

  • A,D,E (Correct)
  • A,E,D
  • C,D,E
  • B,E,D

Answer : A,D,E

UNIX was known as the most stable operating system ever released. Identify two major design
principles that help attain this stability. (Choose two.)
A. easily modifiable end user programs
B. all configuration data stored in binary files
C. entire policy decisions made by the kernel
D. everything in UNIX is either a file or a process


Options are :

  • A,D (Correct)
  • A,B
  • A,C
  • B,D

Answer : A,D

Match the print commands with their functionalities.
1. lpq a. printer control program
2. lprm b. Send a job to the queue to be printed.
3. lpr c. Remove a job from the queue.
4. lpc d. View the contents of the queue.


Options are :

  • 1-a, 2-b, 3-c, 4-d
  • 1-d, 2-c, 3-b, 4-a (Correct)
  • 1-a, 2-c, 3-b, 4-d
  • 1-d, 2-b, 3-c, 4-a

Answer : 1-d, 2-c, 3-b, 4-a

Identify commands that can process text in a file. (Choose all that apply.)
 A. tr
 B. cut
 C. awk                                                                                                                                                                                                           D. paste                                                                                                                                                                                                           E. strings                                                                                                                                                                                                         F. dos2unix


Options are :

  • A,B,D,E
  • A,B,C,D (Correct)
  • B,C,D,E
  • E,F,D,A

Answer : A,B,C,D

The free command reports slightly less memory than the actual total memory available. Why is it
so?


Options are :

  • The multiple instances of a program like shell, being run, consumes a portion of the main memory that cannot be freed
  • The swap space occupies a portion of the main memory that can never be freed.
  • The zombie processes that exist in the process table occupy a slightly less portion of the main memory that can only be freed on reboot
  • The kernel remains in the main memory while the computer is in operation and the memory it occupies can never be freed. (Correct)

Answer : The kernel remains in the main memory while the computer is in operation and the memory it occupies can never be freed.

You have to start a process in the bash shell and at the same time want to work in the shell. How
would you achieve this without terminating the process?


Options are :

  • Press [Ctrl] + [c] while the process is running.
  • Press [Ctrl] + [z] while the process is running. (Correct)
  • Press [Ctrl] + [d] while the process is running.
  • Press [Ctrl] + [y] while the process is running

Answer : Press [Ctrl] + [z] while the process is running.

The cut -d: -f 1,3,8 /etc/passwd command is issued on a Linux system. Which statement about the
output is true?


Options are :

  • It displays all the users, corresponding UIDs, and login shell from the /etc/passwd file separated by a : field delimiter
  • It displays all the users, corresponding GIDs, and login shell from the /etc/passwd file separated by a : field delimiter.
  • It displays an error because /etc/passwd has only seven fields
  • It displays all the users and the corresponding UIDs from the /etc/passwd file separated by a : field delimiter. (Correct)

Answer : It displays all the users and the corresponding UIDs from the /etc/passwd file separated by a : field delimiter.

As the root user, you try to log in to station1 from station2 using ssh but fail with an error message
as shown below:
[root@station2]# ssh station1
root@station1's password :
Permission denied, please try again.
root@station1's password :
Permission denied, please try again.
root@station1's password :
Permission denied, (publickey,gssapi-with-mic, password).
[root@station2]#
What could be the possible reason for the error?


Options are :

  • SSH on station2 is configured to deny root permission
  • The sshd service is not running on station1.
  • The sshd service is not running on station2
  • SSH on station1 is configured to deny root permission (Correct)

Answer : SSH on station1 is configured to deny root permission

An attempt by bob to remotely access smith's shell results in an error as follows:
[bob@server100 ~]$ ssh server200
The authenticity of host 'server200 (192.168.0.200)' can't be established.
RSA key fingerprint is 1c:6e:b7:8b:65:cc:04:e8:16:ca:7e:81:de:d6:5e:c4.
What would you infer from the error?


Options are :

  • The hostname could not be mapped to an IP address
  • The ssh verified that the system claiming to be server200 is server200 and not any other host.
  • This response is because ssh is unable to find server200 in the ~/.ssh/known_hosts file of server100. (Correct)
  • The PubkeyAuthentication parameter is set to no in the /etc/ssh/ssd_config file.

Answer : This response is because ssh is unable to find server200 in the ~/.ssh/known_hosts file of server100.

The root user on server1 is trying to switch to the normal user account scott for testing certain
privileges he has and receives an error as shown below:
[root@server1 ~]# su - scott
This account is currently not available
[root@server1 ~]#
What do you infer from this error?


Options are :

  • The user scott has the shell set to /sbin/nologin (Correct)
  • The user scott does not have a valid UID to get authorized by the system.
  • The user scott has the shell set to /bin/false
  • The user scott's account is locked
  • The user scott's account has reached the expiry date
  • The user scott is assigned with a UID below 500

Answer : The user scott has the shell set to /sbin/nologin

As user smith you issue the mesg command on the tty1 terminal to know its status. The output of
the command is shown below:
[ smith@station2 ]$ mesg
is y
[ smith@station2 ]$
Which three statements are true in this context? (Choose three.)
A. The talkd daemon honors the current mesg status.
B. The wall command honors the current mesg status.
C. The talk command honors the current mesg status.                                                                                                                         
D. The talkd daemon does not honor the current mesg status.                                                                                                                E. The talk command does not honor the current mesg status.                                                                                                            F.  The wall command does not honor the current mesg status.


Options are :

  • F,B,C
  • A,B,C (Correct)
  • B,D,E
  • A,C,F

Answer : A,B,C

You use the SUSPEND character to suspend an already running process. Which signal does it
send to the process?


Options are :

  • SIGHUP
  • SIGTERM
  • SIGINT
  • SIGSTOP (Correct)

Answer : SIGSTOP

A normal user sends a print job to the default printer but later finds the print queue is big and
decides to cancel the job. What would the user do to perform this task?


Options are :

  • The user can know the job number but cannot remove the job as he has no permission to use the lprm command.
  • The user has no permission to view job numbers using the lpq command and hence cannot delete the job
  • The user has no permission to view job numbers using the jobs command and hence cannot delete the job.
  • The user has to list the job using lpq and remove it using the command lprm with the job number as the argument (Correct)

Answer : The user has to list the job using lpq and remove it using the command lprm with the job number as the argument

Match the following commands with their actions in the execute mode of the vi editor:
1) :e! a) save and exit
2) :X b) exit even if changes have not been saved
3) :wq c) save and exit even if the file is read only
4) :w! d) forget changes since last write
5) :q! e) save the file even if it is marked read only
6) :wq! f) encrypt the file along with a password


Options are :

  • 1-f, 2-b, 3-a, 4-e, 5-d, 6-c
  • 1-d, 2-f, 3-a, 4-e, 5-b, 6-c (Correct)
  • 1-d, 2-f, 3-c, 4-b, 5-e, 6-a
  • 1-c, 2-b, 3-a, 4-f, 5-d, 6-e

Answer : 1-d, 2-f, 3-a, 4-e, 5-b, 6-c

Match the following umask values with their effective file and directory permissions.
umask Files Directories
1) 0220 a) 666 777
2) 0000 b) 640 751
3) 0026 c) 600 700
4) 0077 d) 660 770
5) 0007 e) 000 000
6) 0777 f) 446 557


Options are :

  • 1-f, 2-a, 3-b, 4-c, 5-d, 6-e (Correct)
  • 1-d, 2-a, 3-f, 4-b, 5-c, 6-e
  • 1-b, 2-e, 3-d, 4-f, 5-c, 6-a
  • 1-d, 2-a, 3-b, 4-f, 5-c, 6-e
  • 1-f, 2-e, 3-b, 4-c, 5-d, 6-a

Answer : 1-f, 2-a, 3-b, 4-c, 5-d, 6-e

Identify the two true statements about screen. (Choose two.)
A. Terminal manager controls each session in a screen.
B. screen windows do not adhere to vt100 standards.
C. All windows in a screen are dependent on each other.
D. Each window in a screen has its own scroll-back buffer.
E. screen allows only one program to run using one terminal


Options are :

  • A,E
  • A,D (Correct)
  • A,B
  • A,C

Answer : A,D

Match the following utilities with their functionalities.
1. ghostscript a. converts text to Postscript
2. enscript b. formats output to print several document pages on one printer page
3. mpage c. Postscript renderer that can convert between Postscript and many other formats


Options are :

  • 1-a, 2-b, 3-c
  • 1-a, 2-c, 3-b
  • 1-c, 2-b, 3-a
  • None
  • 1-c, 2-a, 3-b (Correct)

Answer : 1-c, 2-a, 3-b

Observe the following NFS share exported by server1.
[root@server1 ~]$ cat /etc/exports
/data .example.com(ro,root_squash)
You have logged in as root on station1 and try to access the /data NFS share on server1 as root.
Which statement holds true in this context?


Options are :

  • The NFS share will be accessed with the privileges of nobody
  • The access to NFS share will be denied
  • The NFS share will be accessed with the privileges of the root user.
  • The NFS share will be accessed with the privileges of nfsnobody (Correct)

Answer : The NFS share will be accessed with the privileges of nfsnobody

Identify the true statement about configure script


Options are :

  • It creates the necessary Makefiles based on the user information (Correct)
  • It does not depend on the autoconf tool for the package installation
  • It depends on make to create the Makefiles
  • It creates the required directories and subdirectories on the system.

Answer : It creates the necessary Makefiles based on the user information

You have logged in to a newly installed Oracle Enterprise Linux machine in the graphical mode.
Which default desktop will be used after you log in?


Options are :

  • Xpde
  • GNOME (Correct)
  • IceWM
  • TWM
  • Xfce
  • KDE

Answer : GNOME

You have executed the following command:
find . -name "prg.conf" -exec chmod o+r '{}' \;
What is the expected output of this command?


Options are :

  • Locate all the files named prg.conf only in the current working directory and process them by using the chmod o+r command.
  • Locate all the files named prg.conf in the current working directory and subdirectories and add execute permissions for others on them
  • Locate all the files named prg.conf in the current working directory and its subdirectories and add read permission for others (Correct)
  • Locate all the files named prg.conf in the current working directory and add execute permissions for others on them.

Answer : Locate all the files named prg.conf in the current working directory and its subdirectories and add read permission for others

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions