You are on page 1of 3

Which of the following is not a Linux distribution?

A. Ubuntu
B. Fedora
C. Windows
D. Debian
C. Windows

What is the purpose of the root directory in the Linux file system?
A. It contains user home directories.
B. It stores system configuration files.
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

Answers:

C
C
B
D
B
B
B
B
B
B
D
D
A
B
A
B
A
C
A
A

You might also like