1Z0-409 Oracle Linux Fundamentals Practice Test Set 3

As user smith you want to log in to a remote machine in a securely encrypted channel. Which utility would you use for the purpose? 


Options are :

  • ssh (Correct)
  • telnet
  • rlogin
  • ftp

Answer : ssh

The user smith , whose primary group is smith, would like to create a file in his home directory, which belongs to the group apps.
Which two statements are correct? (Choose two.)

A. SGID should be set on the destination directory to let users create files that belong to the group other than their primary group.
B. The user smith could create a file that belongs to the apps group only if his private group is the apps group as per /etc/group.
C. The user smith could use the newgrp command to log in to the apps group and his private group will be changed to apps group for a particular session if his name is listed in /etc/group as a member of apps group.
D. The user smith could use the newgrp command to log in to the apps group, but a password is required to change his private group to apps group for a particular session if his name is not listed in /etc/group as a member of apps group. 


Options are :

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

Answer : C,D

As a root user you execute the commands as shown below: [root@station1]# a=$((10 % 4 + 6 * 2)) [root@station1]# echo $a What would be the output of the echo statement? 


Options are :

  • 10
  • 2
  • 14 (Correct)
  • 12

Answer : 14

What would be the output of the nested for loop given below?
for (( i=1; i<=5; i++ ))
do
for (( j=1; j<=i; j++ ))
do
echo -n "$j"
done
echo " "
done


Options are :

  • 123451234123123412345
  • 123451234123121
  • 112123123412345 (Correct)
  • 1234512345123451234512345

Answer : 112123123412345

Your system is running in text-based mode. During the next reboot, you want it to directly boot into the graphical mode. How would you achieve this task?



Options are :

  • Edit the configuration file /etc/inittab and change the default run level to 3.
  • Edit the configuration file /etc/inittab and change the default run level to 5. (Correct)
  • Edit the configuration file /etc/inittab and change the default run level to 6.
  • Edit the configuration file /etc/inittab and change the default run level to 1.

Answer : Edit the configuration file /etc/inittab and change the default run level to 5.

You have issued the following command: echo -e "Welcome\n To Oracle\nEnterprise\rLinux" Why would you use the -e switch? (Choose two.)
A. to redirect the output to the standard output device
B. to remove the normal newline character from the end of the output
C. to cause echo to honor the escape sequence for the carriage return
D. to cause echo to honor the escape sequence for both the newline characters


Options are :

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

Answer : C,D

Which statements are true about xauth? (Choose all that apply.)
A. It stores all tokens in a file on the system.
B. It must be available to use X11 forwarding.
C. It distributes token on a host-by-host basis.
D. It can be used to control token-based access control.
E. It is not possible to install just xauth without installing the entire X server.


Options are :

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

Answer : A,B,D

You execute the following two commands at the bash prompt in the same order as shown below:

[root@station2]# myexpr=$((14*18))
[root@station2]# echo $((56+$myexpr))
What would be the output of the echo command?


Options are :

  • 308 (Correct)
  • $myexpr
  • 56
  • 252

Answer : 308

Why is a Linux operating system always developed and released under a common standard known as Linux Standard Base (LSB)?


Options are :

  • to ensure compatibility among distributions (Correct)
  • to avoid interoperability
  • to ensure application-level diversity
  • to avoid POSIX Compliance

Answer : to ensure compatibility among distributions

You have executed the following command as root user: find /home | cpio -o -H tar -F root@stationX:/dev/nst0 --rsh-command=/usr/bin/ssh
What could be the purpose of issuing this command?


Options are :

  • to archive the contents of the /home directory to the remote machine's tape drive
  • to archive the contents of the /home directory in tar format to a remote machine's tape drive (Correct)
  • to archive the contents of the /home directory in cpio format to a remote machine's tape drive
  • to archive the contents of the /home directory in cpio and tar format to a remote machine's tape drive

Answer : to archive the contents of the /home directory in tar format to a remote machine's tape drive

Match the following variables available to the user that are set internally by the shell, with their descriptions:
1) $1 - $9 a) process ID of the shell
2) $* b) the string containing all the arguments to the shell
3) $? c) process ID of the last command run in the background
4) $$ d) positional parameters
5) $! e) exit status of the most recently executed command


Options are :

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

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

Match the following Regular Expression Quantifiers with their appropriate values:
1) * a) match 0 or 1 times
2) + b) match exactly n times
3) ? c) match at least n times
4) {n} d) match 0 or more times
5) {n,} e) match 1 or more times


Options are :

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

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

You have the ps program and several child processes running in the tty1 terminal. What signal will the child processes receive if the tty1 terminal is killed?


Options are :

  • SIGTERM
  • HUP (Correct)
  • SIGSTOP
  • SIGINT

Answer : HUP

As a Linux system administrator you want to check and print the names of the users having UID > 500, and are not using the bash or csh shell. Which two commands would help you to do so? (Choose two.)
A. awk -F: '/([^(bash|csh)])$/ {if ($3 >500) print $1}' /etc/passwd
B. awk -F: '/([(bash)]|[(csh)])$/ {if ($3 >500) print $1}' /etc/passwd
C. awk -F: '/([^(bash)]|[^(csh)])$/ {if ($3 >500) print $1}' /etc/passwd
D. awk -F: '/([^(nologin)]|[^(ksh)])$/ {if ($3 >500)print$2}' /etc/passwd 


Options are :

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

Answer : A,C

The /projects directory is being shared by server 1 with the share name data share through samba. To access the shared directory as bob you issue the following command: smbclient //server 1/data share -U 'bob%foouser' What happens when you execute the command?


Options are :

  • All the samba shares on server 1 will be displayed.
  • All the shares on server1 accessible to bob will be displayed.
  • bob will be prompted for a password to access the share.
  • The share will be accessed with the credentials of bob without (Correct)

Answer : The share will be accessed with the credentials of bob without

You have opened three terminals and the Firefox browser at Graphical User Interface (GUI). How can you ensure that the same applications and windows start on your next login to GUI? 


Options are :

  • While logging out, use the hot key, [Control] + [Alt] + [Backspace]
  • While logging out, save the settings in the ~/.Xresources file.
  • While logging out, use the kill command with signal 12 to kill gdm-binary.
  • While logging out by selection, log out from the action menu. Click the save current setup option (Correct)

Answer : While logging out by selection, log out from the action menu. Click the save current setup option

Which statement is true about a normal user created with UID less than 500?


Options are :

  • The user will not have an interactive login shell.
  • The user will have all normal user features like home directory, shell, and so on, by default. (Correct)
  • The user will have the privilege to mount and unmount file systems.
  • The user account can be used only for system service-related tasks.

Answer : The user will have all normal user features like home directory, shell, and so on, by default.

Which two statements are true about the init process? (Choose two.)
A. Process ID (PID) of init is always 0.
B. The first process spawned by the kernel is init.
C. init uses the exec() method to spawn a new process.
D. init reads the /etc/inittab file to load the default run level.


Options are :

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

Answer : B,D

You executed the following command on a Linux machine: sed s/hello/fun/g file1.txt | tr A-z -Z> file2.txt What three things would this command do? (Choose three.)
A. Save all changes to file2.txt.
B. Translate all uppercase characters to lowercase.
C. Translate all lowercase characters to uppercase.
D. Modifies file1.txt and creates file2.txt.
E. Replace all occurrences of the entry hello with the entry fun.
F. Replace all occurrences of the entry fun with the entry hello.


Options are :

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

Answer : A,C,E

A normal user bob wants to get into the graphical mode and executes the startx command. Identify the statement that holds true in this context. 


Options are :

  • The system switches to run level 5
  • The user is taken into the graphical mode and the system prompts for a password to log in
  • The user is taken into the graphical mode without being prompted for a password. (Correct)
  • The user is taken into the graphical mode and the system continues in the old run level and prompts for a password for the user to log in

Answer : The user is taken into the graphical mode without being prompted for a password.

You have logged in to your Linux box as a normal user with the default desktop. After working for a while, you plan to change your desktop to KDE. How would you change the desktop?


Options are :

  • by configuring the /etc/X11/prefdm file
  • by using the switch desk command with KDE as the argument (Correct)
  • by configuring the /etc/sys config/desktop file
  • by configuring the /etc/X11/xorg.conf file

Answer : by using the switch desk command with KDE as the argument

Match the following arguments with their actions when used with the find command:
1) -print a) Allows a command to be run against each matching file
2) -ls b) Is the default action and displays matches
3) -exec c) Displays full details on matches
4) -ok d) Can be used when you want a confirmation prompt 


Options are :

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

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

You have opened a file called new file.txt in the vi editor and in command mode, you enter :0,$ s/hello/init/g. What could be the purpose of issuing this command? 


Options are :

  • to replace the word hello with the word init from the cursor position in the new file.txt file
  • to replace the word hello with the word init globally in the new file. txt file (Correct)
  • to delete all the lines containing the word hello and init in the new file.txt file
  • to replace the word init with the word hello globally in the new file. txt file

Answer : to replace the word hello with the word init globally in the new file. txt file

You have created the user smith on your Linux machine. What is the default location of smith's mail spool on the machine?


Options are :

  • /var/spool/smith/mail
  • /var/mail/spool/smith.
  • ~smith/mbox.
  • /var/spool/mail/smith. (Correct)

Answer : /var/spool/mail/smith.

Which two statements are true about Regular Expressions? (Choose two.)
A. They are build upon expressions that match multiple characters.
B. They can be used only by commands, not programming languages.
C. They help most characters, letters, and numbers match themselves.
D. They supports "<" and ">" at the beginning and end of sentences only.
E. They accept text patterns from STDIN, from a network connection or from a user supplied input. 


Options are :

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

Answer : C,E

You have downloaded a DOS-formatted text file through anonymous ftp using binary transfer mode to your Linux machine. What impact does this have on the downloaded text file?


Options are :

  • The text file gets corrupted because of incompatibility in the format
  • The text file is stripped off the carriage return.
  • The text file does not undergo any processing because of the binary transfer mode. (Correct)
  • The text file is stripped off the line feed character

Answer : The text file does not undergo any processing because of the binary transfer mode.

Identify the shareable directories according to File system Hierarchy Standard (FHS). (Choose all that apply.)
A. /etc
B. /usr
C. /var/run
D. /var/lock
E. /var/mail
F. /etc/sysconfig


Options are :

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

Answer : B,E

You have the copy of all the rpms in the /RPMS directory on your local Linux machine. After logging in as root and changing to the /RPMS directory, you try to install the mysql package using the rpm command. You end up with an error message as shown below:
Error: Failed dependencies: Perl(DBI) is needed by mysql. How would you overcome this error and install mysql successfully by resolving the dependencies?


Options are :

  • by installing the software using rpm with the --nodeps option
  • by installing the software using rpm with the -F option
  • by installing the software using rpm with the --force option
  • by installing the software using rpm with the --aid option (Correct)

Answer : by installing the software using rpm with the --aid option

Which commands, without any options, could help a user to read the entire contents of a text file in
his or her home directory? (Choose two.)
A. xxd
B. less
C. grep
D. head
E. more
F. strings


Options are :

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

Answer : B,E

Match the mpage options with their functionalities.
1. mpage -r a. toggle printing on both sides of the paper (duplex mode)
2. mpage -t b. print in landscape mode instead of the default portrait
3. mpage -l c. reverse the order in which the pages are printed


Options are :

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

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

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions