Linux plus -Scripts 13

Linux plus -Scripts 13

University

29 Qs

quiz-placeholder

Similar activities

DevOps and Full Stack Development Quiz

DevOps and Full Stack Development Quiz

University

25 Qs

Linux Quiz (RHCSA)

Linux Quiz (RHCSA)

University

30 Qs

PowerShell

PowerShell

University

25 Qs

Basic Linux Quiz

Basic Linux Quiz

University

30 Qs

Digital Design Final

Digital Design Final

8th Grade - University

25 Qs

Linux module 10 Administrative tasks

Linux module 10 Administrative tasks

6th Grade - Professional Development

28 Qs

Tes Asisten Intro to OS

Tes Asisten Intro to OS

University

25 Qs

IPT 101 - Assignment 5

IPT 101 - Assignment 5

University

30 Qs

Linux plus -Scripts 13

Linux plus -Scripts 13

Assessment

Quiz

Computers

University

Medium

Created by

Sandeep Kumar

Used 20+ times

FREE Resource

29 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default Linux shell?

Zsh

Csh

Ksh

Bash

Answer explanation

The default Linux shell is Bash. It is the most widely used shell and is known for its compatibility and extensive features. Bash provides a command-line interface for users to interact with the operating system. It offers various functionalities such as scripting, file management, and process control. With its powerful capabilities, Bash has become the preferred choice for many Linux users. It is important to note that the other options mentioned (Zsh, Csh, and Ksh) are also shells, but they are not the default shell in most Linux distributions.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What character is used to indicate a comment line in bash?

//-

/*

#

//

Answer explanation

In bash, the character '#' is used to indicate a comment line. This means that any text following the '#' symbol on the same line is considered a comment and is ignored by the bash interpreter. The other options given are not used for commenting in bash. Therefore, the correct choice is '#'. It is important to remember that comments are useful for adding notes or explanations to your code without affecting its execution.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What line of string should be at the start of the script to indicate that it is written in bash shell?

#!/bin/csh

#!/bin/sh

#!/bin/python

#!/bin/bash

Answer explanation

To indicate that a script is written in the bash shell, the line '#!/bin/bash' should be placed at the start of the script. This line is known as the shebang and specifies the interpreter to be used. It ensures that the script is executed using the bash shell. The other options mentioned are for different shells or programming languages and are not suitable for indicating a bash shell script. Therefore, the correct choice is '#!/bin/bash'.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What characters should you type before the script name to execute it from a directory that is not part of the $PATH?

##

!!

./

../

Answer explanation

To execute a script from a directory that is not part of the $PATH, you need to type './' before the script name. This ensures that the script is executed from the current directory. The other options mentioned are not correct. Remember to include './' to execute the script successfully.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What command is used to display the message on screen?

show

display

echo

print

Answer explanation

The command used to display a message on the screen is 'echo'. This command allows you to print text or variables to the terminal. It is commonly used in shell scripting to provide feedback or output information to the user. The 'echo' command does not require any special options or parameters, simply followed by the message you want to display. It is a simple and straightforward way to communicate with the user during script execution.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What command is used to receive input from user, and process the input as part of the bash shell script?

read

execute

input

write

Answer explanation

The command used to receive input from the user and process it as part of a bash shell script is 'read'. This command allows the script to prompt the user for input and store the input in a variable for further processing. By using the 'read' command, the script can interact with the user and dynamically respond based on the input provided. It is an essential command for creating interactive shell scripts.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What command is used to to execute another command within the current shell process?

execute
start

source

run

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?