Linux mcq 1 - gfgfgf PDF

Title Linux mcq 1 - gfgfgf
Author Shan Iyer
Course Introduction to c++ programming
Institution University of Mumbai
Pages 27
File Size 595.6 KB
File Type PDF
Total Downloads 73
Total Views 140

Summary

gfgfgf...


Description

ACADEMIC YEAR:2020-21 TYBSc.I.T.

Sem V

Sub: Linux System Administration

SAMPLE QUESTIONS UNIT 1 1. Which shell is the default shell used on Linux systems? A. csh B. rsh C. D. tcsh

2. Which file contains the available shells for the system? A. /etc/passwd B. /etc/command C. /etc/bash D.

3. Which of the following is not a type of shell? A. The C Shell B. The Korn Shell C. The Bourne Shell D.

4. Which of the following is true about shell? A. A Shell provides you with an interface to the Unix system. B. Shell gathers input from you and executes programs based on that input. C. Shell is an environment in which we can run our commands, programs, and shell scripts. D.

5.What will be the output of $date? A. Yesterday date

B. Current date C. D. Tomarrow date and time

6.The original Unix shell was written by

.

A. B. Stephen R. Korn C. Stephen R. D. Stephen Watson 7. The prompt issued by the shell is called A. prompt B. command translator C. D. command executor 8. Which of the following symbol(s) can be used to redirect the output to a file or another program? A. | B. > C. >> D. 9. Which command is used to remove files? A. B. dm C. erase D. delete 10. mv command can be used for A. renaming a file B. move the file to different directory C. D. None of these

11. Which of the following sign represent user home directory? A. . B. / C. … D. 12. What command is used to count the total number of lines, words, and characters contained in a file? A. countw B. wcount C. D. count p 13. What command is used to remove the directory? A. rdir B. remove C. D. rd 14. What command is used with vi editor to delete a single character? A. B. y C. a D. z. 15. What command is used to sort the lines of data in a file in alphabetical order? A. sort –r B. st C. sh D. 16. What command is used with vi editor to save file and remain in the editing mode? A. x B. q! C. D. :q 17. What command is used with vi editor to search a pattern? A. ?? B. //

C. ? D. 18. What shell's wild-card is used to match any number of characters including none? A. B. ? C. [!ijk] D. [ijk] 19. What command is used to list contents of directories? A. tar B. dir C. lp D. 20.Which of the following is not a filter command? A. sort B. wc C. grep D. 21. What command is used to display the top of the file? A. grep B. more C. D. cat 22. What command is used to display your current working directory? A. path B. C. prompt D. dir 23.What command is used with vi editor to delete three words? A. 3$d B. 3 dw C. 3 x D. 3 dd 24. Which command creates an empty file if file does not exist? A. cat

B. touch C. ed D. read 25. Which of these commands could you use to show one page of output at a time? A. B. sed C. pause D. grep 26. What command is used to count just the number of lines contained in a file? A. wc –r B. wc –w C. wc –c D.



27. What command is used to change the working directory? A. cdir B. C. changedir D. cd 28. 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 view all files with a size of over 50 megabytes on your system. Which of the following commands should you use to accomplish the task? A. find size +50M B. find -size 50M C. find -size -50M D.

29. Which command displays a listing of previously entered commands? A. commands B. review C. D. export

30. Which of the following would be used to view the last five lines of the file myfiles? A. tac myfiles B. tail myfiles C. tac -5 myfiles D.

31. Which of the following commands will create a new file with the name ourgroup? A. file ourgroup B. C. ls ourgroup D. mkfile ourgroup

32. Which command is used to rename the ourgroup file to mygroup? A. rn ourgroup mygroup B. rn mygroup ourgroup C. D. mv mygroup ourgroup 33. Which directory contains the root user’s home directory? A. /home B. C. /sbin D. /usr 34. Which of the following commands is used to mount file systems? A. detach B. C. umount D. attach

35. Which command is used to set the priority of a process when it is started?

A. jobs B. renice C. D. top

36. Which command is used to make a file system available to the system? A. fsck B. mount C. fdisk D.

37. Which directory contains the system configuration files? A. B. / C. /boot D. /proc 38.Which symbol is used to redirect error messages to /dev/null? A. < B. C. % D. $ 39. Hidden files can be viewed using _____ A.



B. ls –l C. ls –h D. ls -k

40. Which directory contains the mail files? A. /proc/mail B. /var/spool C. D. /usr/mail

41. Which of the following results when a soft link is copied? A. A new copy of the soft link is created. B. A hard link to the original file is created. C. A hard link to the soft link is created. D. 42. You work as a Network Administrator for Tech Perfect Inc. The company has a Linuxbased network. You are configuring a server that will be used as a file server. You want to install an RPM package, named FILELOCATOR, on the server. You want to check whether the package is already installed. Which of the following commands will you use? A. grep FILELOCATOR B. find -q rpm | grep FILELOCATOR C. D. find FILELOCATOR 43. Which packaging system does Red Hat use? A. B. deb C. tgz D. rhp UNIT 2 1. After creating the swap area, which of the following commands will you need to run to start using it? A. mkswap B. mkfs C. D. swapoff 2. Which of the following statements is true about fdisk command? A. It is used to build a Linux file system on a device, usually a hard disk partition. B.

.

C. It is used to check and optionally repair one or more Linux file systems. D. It displays or changes the filesystem label on the ext2 filesystem located on device.

3. Which of the following commands is used to make a swap active after creating a new SWAP partition? A. B. swapon C. fdisk D. mkfs

4. Which of the following files lists the file systems to be mounted automatically at startup? A. /etc/mtab B. /dev/fstab C. D. /dev/mtab 5. Logical drives are contained within what type of partition? A. Primary B. C. Swap D. Root 6. Which command within fdisk is used to create a partition? A. c B. d C. D. p 7. ___________ allows you to freeze the current state of an LVM volume. a. b. LVM Freeze c. LVM Pause d. None of the above 8. You want only the root access in a Linux computer for maintenance purposes. Which of the following runlevels will you use to boot the computer? A. 2 B. 0

C. D. 3 9. Which of the following is the pointer used to identify the location of data in files? A. Superblock B. C. Partition D. File system 10. Which file is used to specify a user’s home directory? A. B. /etc/skel C. /etc/profile D. /etc/bashrc 11. Which command would be used to produce the following permissions? -rw-rw-r– myfile A. chown myfile B. chmod 661 myfile C. chmod 331 myfile D. 12. Which command and options are used to delete a user’s account and home directory? A.



B. usermod –f username C. passwd –e username D. usermod –e username 13. Which of the following utilities is used to set ACL for files and directories? A. enable acl B. setacl C. D. getfacl 14. John works as a Network Administrator for Perfect Solutions Inc. The company has a Linux-based network. John is working as a root user on the Linux operating system. He wants to change the group membership of the file foo to group bar. Which of the following commands will he use to accomplish the task? A.

B. chgroup foo bar C. chgrp foo bar D. chgroup bar foo 15. You work as a Network Administrator for Tech World Inc. The company has a Linuxbased network. The permissions on a file named Report are shown below: rwxr–r— You want to add a sticky bit to the file. Which of the following commands will you use? A. chmod 2744 report B. C. chmod 7744 report D. chmod 4744 report 16. You want to make Rick an owner of the files TRADE1.TXT and TRDREPORT.TXT. Which of the following commands will you use to accomplish this? A. B. chgrp rick TRADE1.TXT + TRDREPORT.TXT C. chown rick TRADE1.TXT + TRDREPORT.TXT D. chgrp rick TRADE1.TXT TRDREPORT.TXT 17.To remove write permission from group and others, which one of the following commands will be used? A. chmod go+w file01 B. C. chmod ug-w file01 D. chmod a-w file01 18. To assign execute permission to the user (owner) for a file named file01.txt, which of the following command will be used? A. chmod u+r file01.txt B. chmod u+w file01.txt C. chmod u-x file01.txt D. 19. Which of the following symbol is used with chmod to assign permission to a file? A. – B. C. / D. *

20. Which of the following characters specify the user and group category? A. ‘u’ and ‘g’ B. ‘g’ and ‘o’ C. ‘us’ and ‘gr’ D. ‘u’ and ‘o’ 21. The expression used with chmod command to change permissions in a relative manner contains ____ components. A. 5 B. 2 C. 4 D. 22. chmod command can be used in ____ ways. A. 3 B. 2 C. 5 D. 0 23. The ls –l output for /etc/passwd and /usr/bin/passwd is as follows: -rw-rw-r-- 1 root root 2807 Apr 26 13:50 /etc/passwd -r-s—x—x 1 root root 17008 May 25 02:30 /usr/bin/passwd If a user, not belonging to the group ‘root’, runs the passwd executable in an attempt to modify his password, then which of the following is true? A. password change fails since user does not have permission to update /etc/passwd file B. C. passwd change program runs in kernel mode where write access to the /etc/passwd file is possible D. /etc/passwd is a special file and the system by default allows all users to update it 24. Which of the following files need to be referred for user’s secondary group? A. /etc/passwd B. /etc/shadow C. D. /etc/profile 25. By default, a Linux user falls under which group? A. Staff

B. Others C. D. system 26. Which of the following command can be used to change the user password? A. user can’t change the password B. C. passd D. pwd 27. User id 0 is A. An innvalid user id B. C. The id of a user when the user’s account is deleted D. None of the mentioned 28. The /etc/passwd file doesn’t contain A. Userid B. home directory for a user C. login shell name D. 29. The encrypted password of a user is stored in A. B. /etc/enpasswwd C. /etc/.passwd D. /etc/passwd 30. User’s Primary Group id is listed in which file, at the time of creation of the user (On a standard Linux system) A. B. /etc/groups C. /etc/login D. /etc/profile 31. The write permission for a directory determines that ____________ A. we can write to a directory file B. we can read the directory file C. we can execute the directory file D.

32. How many types of permissions a file has in Linux? A. 1 B. 2 C. D. 4 33. Which command would give the owner and group of myfile the permissions of read and execute while all others have read access? A. chmod 003 myfile B. C. chmod 331 myfile D. chmod 662 myfile 34. Which command is used to change permissions of a file? A. chown B. chperm C. chgrp D.

35. Which value is used to represent the sticky bit? A. B. 2 C. 3 D. 4 36. Which option with the useradd command specifies that the home directory should be created if it doesn’t already exist? A. -h B. C. -c D. -d 37. A. /etc/bash B.

C. /etc/passwd D. /etc/files 38. Which type of access is granted to all users for the /etc/passwd file? A. B. Execute C. No access D. Write 39. Which type of access is granted to other users for the /etc/shadow file? A. Read B. Execute C. D. Write

40. The umask of 002 would produce what default file permissions? A. -rwxrwxrwB. -rw-rw-r– C. ———x D.

41. What access rights are required for the /etc/shadow file? A. ——– B. -rw-rw-r– C. -r–r—– D. -rwxr–r–

42. Which command would give the owner and group of myfile the permissions of read and execute while all others have read access? A. chmod 003 myfile B. C. chmod 331 myfile D. chmod 662 myfile

43. Which of the following is the default file system on RHEL? a. XFS b. FAT 32 c. vfat d. 44. The popular command-line tools are used to create partitions on RHEL is a. fstab b. c. mkfs d. ext

UNIT 3 1. Which port is used by SSH? A. B. 23 C. 19 D. 53 2. A Linux machine can provide DHCP configuration information to other hosts when running which application? A. dhcpd B. dhcpcd C. bootproto D. dhcp 3. Which file contains the name servers to be used by the local machine for hostname resolution? A. /etc/hosts B. C. /etc/services/ D. /etc/network/interfaces 4. Which of the following is a correct entry in the /etc/hosts file? A. deedee 10.254.90.135/ip B. nameserver 10.254.90.131

C. search the-nashes.net D. 5. Which DNS resource record is used to reverse map IP addresses to names? A. A B. MX C. SRV D. 6.Which utility allows you to view the domain name of the specified IP address? A. hostname B. domainname C. dnsdomainname D. 7. Which entry in sshd_config restricts root from a remote system? A. LoginRootPermit B. C. NoRootLogin D. DenyRootLogin 8. Linux based firewall is controlled by the program called a. b. firewalld c. netfilter d. none of the above 9. Which type of table can be possible present in firewall? a. Filter b. NAT c. Mangle d. 10. PKI certificates and SSL are primarily used with a. Web servers b. Email c. SSH d. Telnet 11. GPG is commonly used in a. Web servers

b. Email c. SSH d. Telnet 12. Red Hat Enterprise Linux 6 and newer versions use a. NFSv3 b. NFSv4 c. NFSv6 d. NFSv7 13. ________ file contains the shares you want to offer through NFS. a. /etc/share b. /etc c. /etc/exports d. /etc/nfs 14. Major disadvantageof NFS is a. it is unsecure b. it is slow c. it is unreliable d. it works only between Linux and UNIX machines 15. _____________ are commonly used services designed to offer access to shared files within the same network. a. Samba & NFS b. FTP & Email c. Samba & SSH d. NFS & DHCP 16. If user want to download and upload files with external users, _______ is a more suitable option. a. Samba b. FTP c. NFS d. SSH 17. On Red Hat Enterprise Linux, _______ is the preferred FTP server. a. ftp b. ftp 2000 c.

d. dhcp 18. Samba’s main configuration file is _______________. a. /etc/samba b. /etc/samba/samba.conf c. /etc/smb.conf d. 19. ___________ a service that mounts NFS shares automatically. a. Export b. c. Share d. NFS 20. __________ loads specific kernel module to add functionality & enhancement to firewall. a. Module b. Rule c. Target d. Chain 21. What is the mandatory component of firewall rule? a. Chain b. Port c. Target d. Protocol 22. When using logging, numerous lines are written to the log files resulting in very large log files. To avoid this, we can use the __________ module with firewall. a. Drop b. Reject c. Ignore d. Limit 23. Which type of security can be used to secure services while transmitting packets? a. FTP b. SSL c. NFS d. DHCP

24. To create and manage self-signed certificates, ________ command-line utility is used. a. SSH b. NFS c. FTP d. Openssl 25. A certificate revocation list (CRL) is a list of certificates that are a. Invalid b. Exchanged c. Currently in use d. Corrupted

UNIT 4 1. User agent does not support this ___________ A. Composing messages B. Reading messages C. Replying messages D. Routing messages 2. When the sender and the receiver of an email are on different systems, we need only _________ A. One MTA B. Two UAs C. Two UAs and one MTA D. Two UAs and two MTAs 3. Which of the following is an example of user agents for e-mail? A. Microsoft Outlook B. Facebook C. Google D. Tumblr 4. Typically the TCP port used by SMTP is _________ A. 25 B. 35 C. 50 D. 15

5. If a server has no clue about where to find the address for a hostname then _______ A. server asks to the root server B. server asks to its adjcent server C. request is not processed D. none of the mentioned 6. DNS database contains _______ A. name server records B. hostname-to-address records C. hostname aliases D. all of the mentioned

7. First part of zone file contains generic information whereas second part defines ______. a. Header b. Resource Records c. IP addresses d. Host names 8. In DNS, resource record ‘A’ indicates a. Match a name to an IP address b. Match an IP address to host name c. Creates alias name for specific host d. Tells DNS which sever is available for mail exchange 9. Identify incorrect statement: a. DHCP offers much more than just the IP address to hosts that request its information. b. DHCP server can be configured to assign more than 80 different parameters to its clients. c. IP addresses, default gateways, IP address of the DNS name servers can be configured using DHCP. d. DHCP is used to configure IP address only. 10. Full form of PAM is a. Plugin Access Module b. Pluggable Authentication Module c. Pluggable Access Module d. Primary Authentication Module

11.LDAP stands for a. Lightweight Directory Access Protocol b. Load Directory Access Protocol c. Local Directory Access Protocol d. Lightweight Directory Access Program 12.Red Hat Linux uses which service to start MySQL? a. postfix b. dovecot c. mysqld d. oracle 13. __________ is a definition of different websites to be served by the Apache web server. a. Virtual website b. Apache web server c. Virtual host d. Dynamic host 14. ___________ is a default mode of apache server. a. Worker mode b. Prefork mode c. Slave mode d. Static mode 15. Apache can be started in two different modes: a. Prefork & Worker mode b. Static & Dynamic mode c. Master & slave mode d. Primary & Secondary mode 16. /etc/httpd/conf/httpd.conf is a main configuration file of _____________. a. Mail sever b. Postfix c. Samba sever d. Apache server 17.___________ service on Red Hat Linux offers functionalities of POP and IMAP. a. Postfix b. SMTP

c. Dovecot d. MTA 18. Linux command-line Mutt tool provides a. Mail transfer agent b. Mail user agent c. Mail access agent d. Message delivery agent 19.Red Hat Linux offers _________ as the default mail server. a. Gmail b. Yahoo mail c. Ubantu mail d. Postfix 20.DHCP is used to assign _____________ a. IP address statically b. MAC address statically c. IP address dynamically d. MAC address dynamically

21.Most DNS servers are configured to service at least two zone types which are a. Primary & secondary zone b. Forward & reverse zone c. Upward & downward zone d. Master & slave zone

22. __________ service is used to offer DNS services on Red Hat Enterprise Linux. a. BIND b. vsftpd c. ftp d. dhcp 23. Domain Name System (DNS) is the system that associates a. IP addresses to hostname b. Hostnames to IP addresses c. Hostnames to physical addresses

d. Hostnames to port addresses UNIT 5 1. The test command can evaluate a. Numeric comparisons b. String comparisons c. File comparisons d. All of the above 2. $# is used to show? A. The number of arguments supplied to a script. B. The filename of the current script. C. The exit status of the last command executed. D. The process number of the last background command 3. In relational operator, which keyword is used to represent greater than or equal? A. -eq B. -gte C. -ge D. -gt 4.What is the used of -x file test operator? A. Checks if file is executable B. Checks if file has size greater than 0 C. Checks if file exists D. Checks if file has its Set User ID (SUID) bit set 5.What will be output of $expr 5 * 2 ? a. 10 b. 2.5 c7 d. Syntax error

6. The exit status of a command that successfully completes is ___________. a. 1 b. 0 c. 255 d. 127

7.The double parenthesis command is used for a. String comparison b. Mathematical expression c. Logarithmic expression d. Floating point number 8.The double bracket command provides advanced features for a. String comparison b. Mathematical expression c. Logarithmic expression d. Floating point number 9. To minimize the impact of network card failure and to get more bandwidth, ______ is often used in HA cluster environments. a. Cluster bonding b. Redundant network card c. Multiple interfaces d. Et...


Similar Free PDFs