tech beamers
  • Viral Tips 🔥
  • Free CoursesTop
  • TutorialsNew
    • Python Tutorial
    • Python Examples
    • C Programming
    • Java Programming
    • MySQL Tutorial
    • Selenium Tutorial
    • Selenium Python
    • Playwright Python
    • Software Testing
    • Agile Concepts
    • Linux Concepts
    • HowTo Guides
    • Android Topics
    • AngularJS Guides
    • Learn Automation
    • Technology Guides
    • Python
    • C
    • Java
    • MySQL
    • Linux
    • Web
    • Android
    • AngularJS
    • Playwright
    • Selenium
    • Agile
    • Testing
    • Automation
    • Best IDEs
    • How-To
    • Technology
    • Gaming
    • Branding
  • Interview & Quiz
    • SQL Interview
    • Testing Interview
    • Python Interview
    • Selenium Interview
    • C Sharp Interview
    • Java Interview
    • Web Development
    • PHP Interview
    • Python Quizzes
    • Java Quizzes
    • Selenium Quizzes
    • Testing Quizzes
    • HTML CSS Quiz
    • Shell Script Quizzes
    • Python Interview
    • SQL Query Interview
    • SQL Exercises
    • Selenium Interview
    • Playwright Interview
    • QA Interview
    • Manual Testing
    • Rest API Interview
    • Linux Interview
    • CSharp Interview
    • Python Function Quiz
    • Python String Quiz
    • Python OOP Quiz
    • Python DSA Quiz
    • ISTQB Quiz
    • Selenium Quiz
    • Java Spring Quiz
    • Java Collection Quiz
    • JavaScript Quiz
    • Shell Scripting Quiz
  • ToolsHot
    • Python Online Compiler
    • Python Code Checker
    • C Online Compiler
    • Review Best IDEs
    • Random Letter Gen
    • Random Num Gen
    • Online Python Compiler
    • Python Code Checker
    • Python Code Quality
    • Username Generator
    • Insta Password Generator
    • Google Password Generator
    • Free PDF Merger
    • QR Code Generator
    • Net Worth Calculator
tech beamers
Search
  • Viral Tips 🔥
  • Free CoursesTop
  • TutorialsNew
    • Python Tutorial
    • Python Examples
    • C Programming
    • Java Programming
    • MySQL Tutorial
    • Selenium Tutorial
    • Selenium Python
    • Playwright Python
    • Software Testing
    • Agile Concepts
    • Linux Concepts
    • HowTo Guides
    • Android Topics
    • AngularJS Guides
    • Learn Automation
    • Technology Guides
  • Interview & Quiz
    • SQL Interview
    • Testing Interview
    • Python Interview
    • Selenium Interview
    • C Sharp Interview
    • Java Interview
    • Web Development
    • PHP Interview
    • Python Quizzes
    • Java Quizzes
    • Selenium Quizzes
    • Testing Quizzes
    • HTML CSS Quiz
    • Shell Script Quizzes
  • ToolsHot
    • Python Online Compiler
    • Python Code Checker
    • C Online Compiler
    • Review Best IDEs
    • Random Letter Gen
    • Random Num Gen
Follow US
© TechBeamers. All Rights Reserved.
Linux TutorialsShell Script Quiz

Shell Script Quiz for Unix and Linux Geeks

Last updated: Sep 10, 2025 11:58 am
Harsh S.
By Harsh S.
No Comments
2 weeks ago
Share
17 Min Read
SHARE

Hey Geeks! Welcome to the 2nd edition of our Shell Scripting Quiz 🎉. This quiz tests your shell scripting knowledge — from basic commands to real-time script execution — helping you sharpen your Unix/Linux skills.

Why learn shell scripting? It’s not just for job interviews — it automates tasks, boosts efficiency, and simplifies system administration. Whether you’re building projects, deploying builds, or managing servers, a shell script can handle it all. We’ve included key interview-style questions covering Ubuntu, RHEL, SUSE, SLES, CentOS, and more. Ready to test your skills? Let’s begin! 🚀

Shell Script Quiz for Linux Geeks

Explanations Table

Here is the reasoning table with concise and accurate explanations:

Q#Correct AnswerNew Answer IndexClear and Simple Explanation
1this that0The && (AND) operator means “run the next command only if the previous one succeeds.” Since echo this succeeds, echo that runs. The `
2test "$a" = "$b"0The test command uses the = operator for string comparison. -eq is for numerical comparison.
3sleep 1 & echo $!2$! gives the process ID (PID) of the last background command, which is sleep 1 &.
4platform=Linux; export plat
form; sh -c 'echo $platform'
0The export command is required to make platform available in the subshell executed by sh -c.
5case Java in Java) echo Java;; esac1This correctly matches the string Java in a case statement and prints it.
6for n in one two three; do echo -n $n; done0The -n option prevents newlines, printing the output as onetwothree.
7awk 'NR==99' file12awk prints only the 99th line by checking the line number with NR==99.
8sed -n '10p' filename3The -n option tells sed to print only the 10th line.
9uptime2The uptime command displays how long the system has been running.
10grep -c 'ABC' filename2The -c option counts the occurrences of ABC in the file.
11umask 0002A umask of 000 gives full read, write, and execute permissions to everyone.
12ps -p PID -o comm=3This command prints only the process name for the given PID.
13sed '10~10 i\\Python' filename1The 10~10 address in sed inserts “Python” at line 10 and every 10th line thereafter.
14vi -R filename1vi -R opens the file in read-only mode.
15kill -9 PID3kill -9 sends a SIGKILL signal, which forcefully stops the process with the given PID.
16Shell interprets commands2A shell is responsible for interpreting and executing commands in Linux.
17csh3csh (C shell) has a syntax that is fundamentally different from the Bourne shell and its derivatives.
18Not suitable for scripting3csh lacks robust scripting features, making it unreliable for automation and complex tasks.
19Execute3The execute (x) permission is required to enter or “traverse” into a directory.
20Read and execute the file3With 755 permissions, other users and the group can read and execute the file but cannot modify it.

We gave clear and simple the explanations. Let us know if you need any further clarification via comments.

✨ What did You Learn from this Shell Script Quiz?

The Shell Scripting Quiz is a great resource for software developers and testers working on Unix/Linux platforms. But that’s not all—we also have quizzes on Java, Python, Selenium, and other programming topics to help you sharpen your skills and prepare for interviews. Check out these popular ones:

1️⃣ Test your Basic Java Programming Skills
2️⃣ Test your Python Programming Knowledge
3️⃣ Explore the Concept of Java Native Access

We hope this quiz has helped you enhance your Linux shell scripting and OS knowledge. If you found it useful, drop a comment below! Your feedback helps us create more quizzes and improve existing ones with the latest updates.

Before we wrap up, here’s an inspiring quote from Linus Torvalds, the creator of Linux:

“I’ve never regretted not making Linux shareware. I really don’t like the ‘pay for use’ binary shareware programs.”

🔔 Want more content like this? Subscribe to our YouTube channel for tutorials, coding tips, and in-depth programming insights. Stay ahead in your tech journey!

Related

TAGGED:Basic Commands for BeginnersShell Script Basics SimplifiedUnix Commands and Concepts
Share This Article
Whatsapp Whatsapp LinkedIn Reddit Copy Link
Harsh S. Avatar
ByHarsh S.
Follow:
Harsh S., MCA graduate, has 8+ years leading development on IT projects, specializing in Python, Java, unit testing, and CI/CD. At TechBeamers, Harsh authors tutorials, quizzes, and exercises on programming and AI/Data Science.
Previous Article Unix Shell Scripting Quiz for Beginners Unix Shell Scripting Quiz for Beginners – 25 Questions
Next Article C++ Programming Quiz for Beginners C++ Programming Quiz – Beginner Level
Leave a Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

List of Topics

Stay Connected

FacebookLike
XFollow
YoutubeSubscribe
LinkedInFollow

Continue Reading

  • C++ Programming Quiz – Beginner LevelAug 28
  • Top 30 Linux Interview Questions for BeginnersSep 3
  • 30 Linux Questions – Online TestSep 4
  • Makefile Tutorial to Create Client-Server ProgramSep 6
  • Essential Linux Questions for Better ResultsSep 7
  • Set Static IP on Windows, Ubuntu & OS XJun 16
  • Simple Steps to Create a Service in LinuxJul 10
  • Learn to Implement C++ Class in C ProgrammingJul 21
  • How to Install Node-RED on Ubuntu (Easy Guide for 2025)Jul 30
  • How to Use GDB with Six Debugging TipsAug 3
View all →

RELATED TUTORIALS

AngularJS Tutorial for Beginners - Tips and Tricks

AngularJS Tutorial with Tips for Beginners

By Meenakshi Agarwal
2 years ago
Setup AngularJS Development Environment

Setup AngularJS for Development

By Meenakshi Agarwal
2 years ago
C Programming Tips and Tricks.

15 Top C Programming Tips to Write Smarter, Safer, and Faster Code

By Harsh S.
3 weeks ago
Linux Basic Questions And Answers for Beginners

30 Linux Basic Questions And Answers

By Meenakshi Agarwal
1 year ago
© TechBeamers. All Rights Reserved.
  • About
  • Contact
  • Disclaimer
  • Privacy Policy
  • Terms of Use