Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 5

Which of the following is an example of a Linux distribution?

A. Windows
B. MacOS
C. Ubuntu
D. iOS
C. Ubuntu

What is the purpose of the root directory in the Linux file system?
A. It stores system configuration files.
B. It contains user home directories.
C. It is the parent directory for all other directories.
D. It is reserved for system administrators only.
C. It is the parent directory for all other directories.

Which command is used to list files and directories in Linux?


A. dir
B. ls
C. cd
D. pwd
B. ls

How do you create a new directory in Linux?


A. newdir
B. create dir
C. make directory
D. mkdir
D. mkdir

What command is used to change the ownership of a file in Linux?


A. own
B. chown
C. chmod
D. changeowner
B. chown

Which file contains the network configuration in Linux?


A. /etc/network.conf
B. /etc/network/interfaces
C. /etc/network/config
D. /etc/network/settings
B. /etc/network/interfaces

How do you configure a static IP address in Linux?


A. ifconfig
B. ipconfig
C. staticip
D. ifup
B. ipconfig

Which command is used to make a shell script executable in Linux?


A. exec
B. chmod
C. execute
D. permit
B. chmod

What is the shebang line in a shell script?


A. The first line that starts with a #
B. The line that specifies the interpreter for the script
C. The line that defines shell variables
D. The line that provides script documentation
B. The line that specifies the interpreter for the script

Which command is used to run a shell script in Linux?


A. execute
B. sh
C. run
D. bash
B. sh

How do you create a variable in a shell script?


A. create var
B. set var
C. newvar
D. var=value
D. var=value

Which command is used to redirect standard output to a file in Linux?


A. copy
B. redirect
C. save
D. >
D. >

What does the "chmod 755" command do in Linux?


A. Sets read, write, and execute permissions for the owner, and read and execute
permissions for group and others
B. Sets read and write permissions for the owner and group, and read-only
permissions for others
C. Sets read and execute permissions for the owner, group, and others
D. Sets execute permissions for the owner, group, and others
A. Sets read, write, and execute permissions for the owner, and read and execute
permissions for group and others

Which command is used to display the contents of a file in Linux?


A. show
B. cat
C. display
D. view
B. cat

What command is used to search for files in Linux?


A. find
B. search
C. locate
D. look
A. find

How do you delete a directory in Linux?


A. rm -d
B. rmdir
C. delete dir
D. remove
B. rmdir

Which command is used to add a new user in Linux?


A. adduser
B. newuser
C. createuser
D. useradd
A. adduser

What is the purpose of the "sudo" command in Linux?


A. It is used to switch to the root user.
B. It is used to execute a command as a different user.
C. It is used to run a command with administrative privileges.
D. It is used to suspend the current session.
C. It is used to run a command with administrative privileges.

How do you set a variable to be global in a shell script?


A. export
B. global
C. setglobal
D. makeglobal
A. export

What command is used to list the current active network connections in Linux?
A. netstat
B. connlist
C. activecon
D. connections
A. netstat

Which command is used to change file permissions in Linux?


A. chmod
B. chown
C. chgrp
D. perm
A. chmod

What is the default permission for a newly created file in Linux?


A. 777
B. 666
C. 755
D. 644
D. 644

Which command is used to share files and directories over the network in Linux?
A. nfs
B. smb
C. netshare
D. netfs
B. smb

How do you create a full system backup in Linux?


A. cp
B. backup
C. tar
D. clone
C. tar

Which technology allows multiple operating systems to run simultaneously on a


single physical machine?
A. Virtualization
B. Containerization
C. Emulation
D. Hypervisor
A. Virtualization

What is the purpose of Linux containers?


A. To provide virtualization capabilities
B. To isolate applications and their dependencies
C. To improve system security
D. To enable cross-platform compatibility
B. To isolate applications and their dependencies

Which cloud computing model provides on-demand resources and scalability?


A. Infrastructure as a Service (IaaS)
B. Platform as a Service (PaaS)
C. Software as a Service (SaaS)
D. Function as a Service (FaaS)
A. Infrastructure as a Service (IaaS)

What command is used to display information about system hardware and software in
Linux?
A. sysinfo
B. hwinfo
C. lshw
D. info
C. lshw

How do you secure a Linux system against unauthorized access?


A. Use strong passwords and enforce password policies
B. Disable unnecessary services and close unused ports
C. Keep the system and software up-to-date with security patches
D. All of the above
D. All of the above

Which command is used to start a web server in Linux?


A. startweb
B. runserver
C. service httpd start
D. webserver start
C. service httpd start

Answers:
C
C
B
D
B
B
B
B
B
B
D
D
A
B
A
B
A
C
A
A
A
D
B
C
A
B
A
C
D
C

You might also like