
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
Create a free account and access millions of resources
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
ระบบปฏิบัติการ ชุดที่ 1
Quiz
•
University
24 questions
DBMS Quizz
Quiz
•
University
24 questions
BLIS 3B
Quiz
•
University
25 questions
Computer Application TQ1
Quiz
•
1st Grade - University
25 questions
Advanced Game Design Midterm
Quiz
•
University
25 questions
COMP1: Quiz No. 1
Quiz
•
University
25 questions
Layering Models
Quiz
•
University
25 questions
Routing & Switching Pra UTS
Quiz
•
University
Popular Resources on Wayground
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
15 questions
Solving Equations with Variables on Both Sides Review
Quiz
•
8th Grade
Discover more resources for Computers
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
7 questions
Different Types of Energy
Interactive video
•
4th Grade - University
7 questions
Transition Words and Phrases
Interactive video
•
4th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Biomolecules (Updated)
Interactive video
•
11th Grade - University
34 questions
Unit 5 Review - The Middle Ages in Europe-B
Quiz
•
9th Grade - University
26 questions
Day2 classwork: Permutation and combination
Quiz
•
2nd Grade - University
5 questions
Using Context Clues
Interactive video
•
4th Grade - University
