
Linux plus -Scripts 13
Quiz
•
Computers
•
University
•
Practice Problem
•
Medium
Sandeep Kumar
Used 23+ times
FREE Resource
Enhance your content in a minute
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
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?
source
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
25 questions
Information and Technology Finals
Quiz
•
University
25 questions
MYSQL QUIZ 1
Quiz
•
University
25 questions
Quiz No. 1 - Functions in JavaScript
Quiz
•
University
25 questions
AI 900 - pt 5
Quiz
•
University
25 questions
Java Review
Quiz
•
9th Grade - University
24 questions
Ujian KSI
Quiz
•
University
25 questions
Machine Learning (Concept Learning)
Quiz
•
University
25 questions
Quiz kotajako1
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
