1.
Which of the following are Linux distributions?
(3 correct answers)
Correct Answer(s)
B. RedHat
C. SUSE
D. Ubuntu
Explanation
The correct answer is RedHat, SUSE, and Ubuntu. These three options are all Linux distributions. Solaris, on the other hand, is not a Linux distribution but rather a Unix operating system developed by Sun Microsystems.
2.
AIX is made by ______
Correct Answer
C. IBM
Explanation
AIX is an operating system developed by IBM. It is specifically designed for IBM's hardware platforms, such as the IBM Power Systems. AIX stands for Advanced Interactive eXecutive and is known for its reliability, scalability, and security features. Oracle, Sun Microsystems, and Microsoft are not the creators of AIX, making IBM the correct answer.
3.
We can use Putty to connect to a Linux machine from Windows machine.
Correct Answer
A. True
Explanation
Putty is a popular SSH client that allows users to establish a secure connection between a Windows machine and a Linux machine. It provides a terminal interface through which users can remotely access and manage the Linux machine. Therefore, the statement that we can use Putty to connect to a Linux machine from a Windows machine is true.
4.
From my Windows PC, I can connect to multiple Linux and UNIX servers.
Correct Answer
A. True
Explanation
This statement is true because Windows PCs have built-in support for connecting to Linux and UNIX servers. This can be done using various protocols such as SSH (Secure Shell) or FTP (File Transfer Protocol). By establishing a connection, users can remotely access and manage files, execute commands, and perform other administrative tasks on the Linux and UNIX servers. Therefore, it is possible to connect to multiple Linux and UNIX servers from a Windows PC.
5.
Which of the following shows user permissions while showing the contents of a directory?
Correct Answer
C. Ls –l
Explanation
The correct answer is "ls -l" because the "-l" flag is used to display the contents of a directory in a long format, which includes information about the permissions of the files and directories within the directory. This allows the user to see the specific permissions assigned to each file or directory, such as read, write, and execute permissions for the owner, group, and others.
6.
Which of the following options show the file type?
(2 correct answers)
Correct Answer(s)
A. –F
B. –l
Explanation
The options –F and –l show the file type. The –F option is used to display a slash (/) after directories, –l option is used to display the file type in the long format.
7.
Which of the following commands are used to view a file?
(3 correct answers)
Correct Answer(s)
B. Cat
C. More
D. Less
Explanation
The commands "cat," "more," and "less" are used to view a file. The "cat" command is used to display the content of a file on the terminal. The "more" command is used to display the content of a file one page at a time. The "less" command is similar to "more" but allows for scrolling through the file. The "ls" command, on the other hand, is used to list the files and directories in a directory, not to view the content of a file.
8.
Which of the following will not overwrite the contents of file2?
(2 correct answers)
Correct Answer(s)
C. Touch file2
D. Echo horse >> file2
Explanation
The command "touch file2" will not overwrite the contents of file2 because it is used to update the access and modification timestamps of a file, but it does not modify the actual content of the file. The command "echo horse >> file2" will also not overwrite the contents of file2 because it uses the ">>" redirection operator which appends the text "horse" to the end of the file without overwriting any existing content.
9.
Which of the following can create a nested directory structure from the current directory named dir?
Correct Answer
C. Mkdir –p dir1/dir2
Explanation
The correct answer is "mkdir –p dir1/dir2". This command creates a nested directory structure from the current directory named "dir1/dir2". The "-p" option allows the creation of parent directories if they do not already exist. This command ensures that both "dir1" and "dir2" are created within the current directory.
10.
Which of the following special character at the end of a file name from the output of command ls –F, shows a symbolic link?
Correct Answer
B. @
Explanation
The special character "@" at the end of a file name from the output of the command "ls -F" indicates a symbolic link.
11.
Which of the following command is used to display the type of file?
Correct Answer
B. File
Explanation
The correct answer is "file" because the "file" command is commonly used in Unix and Linux systems to display the type of a file. When the "file" command is followed by the name of a file, it provides information about the file type, such as whether it is a text file, a binary file, or a directory. This command is helpful in determining the nature of a file without needing to open or access its contents.
12.
File names uwinpro and UWINPro are the same.
Correct Answer
B. False
Explanation
The statement is false because file names in most operating systems are case sensitive. Therefore, "uwinpro" and "UWINPro" would be considered as two different file names.
13.
The folder name that stores the deleted files in UNIX is called ________
Correct Answer
D. None of the above
14.
Compared to "more" command "less" command, when used to display the contents of a text file, shows less rows.
Correct Answer
B. False
Explanation
The statement is false because the "less" command actually shows more rows compared to the "more" command. The "less" command allows the user to scroll through the contents of a text file, displaying one screenful of data at a time. On the other hand, the "more" command only displays one page of data at a time and requires the user to press the spacebar to view the next page. Therefore, the "less" command is more suitable for displaying larger text files.
15.
Which of the following command lines work in Linux, Solaris and AIX?
(3 correct answers)
Correct Answer(s)
B. Uname –n
C. Ls –l
D. Pwd
Explanation
The command "uname -n" is used to display the hostname of the system and is supported in Linux, Solaris, and AIX. The command "ls -l" is used to list files in long format and is also supported in all three operating systems. Lastly, the command "pwd" is used to print the current working directory and is supported in Linux, Solaris, and AIX.
16.
The default home directory for tom in Linux is _______
Correct Answer
D. /home/tom
Explanation
The correct answer is "/home/tom" because in Linux, the "/home" directory is the default location for user home directories, and "tom" is the specific user in this case. Therefore, the default home directory for the user "tom" would be "/home/tom".
17.
Which among the following are UNIX shells?
(2 correct answers)
Correct Answer(s)
A. Ksh
B. Bash
Explanation
ksh and bash are both UNIX shells. Ksh stands for Korn Shell and is the default shell on many UNIX systems. Bash, which stands for Bourne Again Shell, is a popular shell that is compatible with the Bourne shell and includes additional features. Msh and lsh are not UNIX shells and are not commonly used in UNIX systems.
18.
Which of the following shell is the default shell for Oracle Solaris 11?
Correct Answer
A. Bash
Explanation
The default shell for Oracle Solaris 11 is Bash. Bash, short for "Bourne Again SHell," is a popular Unix shell that is widely used in many Linux distributions and Unix-based operating systems. It is known for its powerful scripting capabilities and extensive command-line features, making it a suitable choice as the default shell for Oracle Solaris 11.
19.
Command line editing and auto completion are available in ________
Correct Answer
A. Bash shell
Explanation
Command line editing and auto completion are available in the Bash shell. This shell is a popular command line interface for Unix-based systems and provides features such as command history, tab completion, and editing capabilities. These features make it easier for users to navigate and interact with the command line, improving efficiency and productivity. The Bourne Shell, Mash shell, and Lowshell do not have these specific features, making the Bash shell the correct answer.
20.
Most of the commands used by root user and others in UNIX are located in the directory ________
Correct Answer
C. /usr
Explanation
The directory /usr contains most of the commands used by the root user and other users in UNIX. This directory typically includes the user binaries, libraries, and documentation for all installed software on the system. It is a common location for system-wide resources and executables that are accessible to all users. The /root directory, on the other hand, is the home directory for the root user, while the / directory is the root directory of the file system. The /export/home directory is commonly used for user home directories in some UNIX systems, but it does not typically contain system commands.
21.
To get help for a command useradd you should type _________
Correct Answer
B. Man useradd
Explanation
The correct answer is "man useradd" because the "man" command is used to display the manual pages for a specific command, in this case, "useradd". By typing "man useradd", you can access detailed information and instructions on how to use the "useradd" command effectively. This is a common way to seek help and understand the functionality of various commands in a Unix-like operating system.
22.
The default prompts in Linux for regular users and root end in _________
Correct Answer
C. $ and #
Explanation
In Linux, the default prompts for regular users and root end in "$" and "#", respectively. The "$" symbol indicates that the current user is a regular user and the "#" symbol indicates that the current user is the root user or superuser. The prompt is used to indicate the current user's privileges and helps differentiate between regular users and the root user.
23.
Which of the following commands can be used to create a file?
(2 correct answers)
Correct Answer(s)
A. Cat
B. Tee
Explanation
The commands "cat" and "tee" can be used to create a file. The "cat" command is used to concatenate and display files, but it can also be used to create a new file by redirecting the output to a file. The "tee" command is used to read from standard input and write to both standard output and files. By specifying a new file as an argument, the "tee" command can create a new file. On the other hand, "less" and "more" commands are used to view the contents of a file, not to create new files.
24.
The output of ls -l command when executed from a directory is shown below:
drwxr--r-- 1 tom UWINPro 4096 drafts
The file type and permissions for the user tom for this file / directory are
Correct Answer
A. Folder, read, write, execute
Explanation
The correct answer is "Folder, read, write, execute" because the first character "d" indicates that it is a directory (folder). The next three characters "rwx" indicate that the user "tom" has read, write, and execute permissions on the directory. The next three characters "---" indicate that the group "UWINPro" has no permissions on the directory. The last three characters "---" indicate that others have no permissions on the directory.
25.
The output of ls -l command when executed from a directory is shown below:
drwxr--r-- 1 tom UWINPro 4096 drafts
The name of the primary group of the owner of the file/directory is
Correct Answer
C. UWINPro
Explanation
The output of the ls -l command shows the file or directory's permissions, number of links, owner name, group name, file size, and file/directory name. In this case, the primary group of the owner of the file/directory is "UWINPro".
26.
The default home directory for root in i86 based Oracle Solaris 11 is ________
Correct Answer
C. /root
Explanation
The default home directory for root in i86 based Oracle Solaris 11 is "/root". This directory is typically used as the home directory for the root user, which is the superuser or administrator account on the system. The "/root" directory is located directly under the root ("/") directory and is used to store configuration files, scripts, and other data specific to the root user.
27.
To display multiple commands starting with `p` we should type one of the following in the Bash shell __________
Correct Answer
D. Type p and press tab twice
Explanation
To display multiple commands starting with `p`, we can use the autocomplete feature in the Bash shell. By typing "p" and pressing the tab key twice, the shell will show a list of all available commands starting with "p". This allows us to easily select and execute the desired command without having to type the entire command manually.
28.
To jump to the current user’s home directory instantly from any other directory we should type ________
Correct Answer
C. Cd
Explanation
The correct answer is "cd." The "cd" command stands for "change directory" and is used to navigate to different directories within a file system. By typing "cd" and pressing enter, the user can instantly jump to their home directory from any other directory.