TechBeamersTechBeamers
  • Learn ProgrammingLearn Programming
    • Python Programming
      • Python Basic
      • Python OOP
      • Python Pandas
      • Python PIP
      • Python Advanced
      • Python Selenium
    • Python Examples
    • Selenium Tutorials
      • Selenium with Java
      • Selenium with Python
    • Software Testing Tutorials
    • Java Programming
      • Java Basic
      • Java Flow Control
      • Java OOP
    • C Programming
    • Linux Commands
    • MySQL Commands
    • Agile in Software
    • AngularJS Guides
    • Android Tutorials
  • Interview PrepInterview Prep
    • SQL Interview Questions
    • Testing Interview Q&A
    • Python Interview Q&A
    • Selenium Interview Q&A
    • C Sharp Interview Q&A
    • PHP Interview Questions
    • Java Interview Questions
    • Web Development Q&A
  • Self AssessmentSelf Assessment
    • Python Test
    • Java Online Test
    • Selenium Quiz
    • Testing Quiz
    • HTML CSS Quiz
    • Shell Script Test
    • C/C++ Coding Test
Search
  • Python Multiline String
  • Python Multiline Comment
  • Python Iterate String
  • Python Dictionary
  • Python Lists
  • Python List Contains
  • Page Object Model
  • TestNG Annotations
  • Python Function Quiz
  • Python String Quiz
  • Python OOP Test
  • Java Spring Test
  • Java Collection Quiz
  • JavaScript Skill Test
  • Selenium Skill Test
  • Selenium Python Quiz
  • Shell Scripting Test
  • Latest Python Q&A
  • CSharp Coding Q&A
  • SQL Query Question
  • Top Selenium Q&A
  • Top QA Questions
  • Latest Testing Q&A
  • REST API Questions
  • Linux Interview Q&A
  • Shell Script Questions
© 2024 TechBeamers. All Rights Reserved.
Reading: Basic Linux Questions and Answers
Font ResizerAa
TechBeamersTechBeamers
Font ResizerAa
  • Python
  • SQL
  • C
  • Java
  • Testing
  • Selenium
  • Agile Concepts Simplified
  • Linux
  • MySQL
  • Python Quizzes
  • Java Quiz
  • Testing Quiz
  • Shell Script Quiz
  • WebDev Interview
  • Python Basic
  • Python Examples
  • Python Advanced
  • Python OOP
  • Python Selenium
  • General Tech
Search
  • Programming Tutorials
    • Python Tutorial
    • Python Examples
    • Java Tutorial
    • C Tutorial
    • MySQL Tutorial
    • Selenium Tutorial
    • Testing Tutorial
  • Top Interview Q&A
    • SQL Interview
    • Web Dev Interview
  • Best Coding Quiz
    • Python Quizzes
    • Java Quiz
    • Testing Quiz
    • ShellScript Quiz
Follow US
© 2024 TechBeamers. All Rights Reserved.
Linux Tutorials

Basic Linux Questions and Answers

Last updated: Feb 25, 2024 10:34 am
By Meenakshi Agarwal
Share
10 Min Read
Basic Linux Questions and Answers - Online Test for Freshers
Basic Linux Questions and Answers - Online Test for Freshers.
SHARE

Here we bring you some of the basic Linux questions and answers recommended for freshers. These questions will cover various aspects of the Linux operating system. Being a professional, you must know the basics of Linux so that you stand out in a competitive world.

In this tutorial, we have presented basic Linux questions focusing on some real-time user scenarios. By going through these questions, you’ll learn about the important Linux commands and get a sense of the patterns asked during Linux interviews.

If you want to try a Linux quiz right now to assess yourself, then you can pick any of the posts given below.

  • 30 Linux Questions With Answers – Online Test
  • Unix Shell Scripting Quiz With 25 Questions

Q:1-8 Basic Linux Questions

Please note that the answer keys are available at the end of this tutorial. You can find it at the bottom of page 4 of the basic Linux questions.

Q-1. Which command can append a file to the <mytest.tar> file?

A. No, you can’t add a file to <mytest.tar>.
B. tar -cvf mytest.tar file
C. tar -rvf file mytest.tar
D. tar -evf file mytest.tar

Q-2. Which command returns the first byte of the difference observed in two files?

A. diff
B. cmp
C. comm
D. ls -a

Q-3. Which command opens a file with the cursor positioned at line num=5?

A. vi +num file1
B. vi +set num file1
C. vi +”set num” file1
D. vi +/set num file1

Q-4. Which command can talk to logged-in users?

A. talk
B. write
C. chat
D. transmit

Q-5. Which command sets the screen back to normal?

A. tput cup
B. tput smso
C. tput rmso
D. tput blink

Q-6. Which command can be used to view all the available routes?

A. show route
B. netstat -r
C. none of the above
D. route status

Q-7. Which command reduces the size of a file?

A. file
B. filefrag
C. zipnote
D. gzip

Q-8. Which command imposes limits on the file size?

A. fsize
B. flimit
C. ulimit
D. usize

So far, you have checked out 8 basic Linux questions. In order to access the remaining questions, please click the next button.

Also Read: 30 Linux Questions for Interview

Q:9-17 Basic Linux Questions

Q-9. Which of the following commands is expected to rename a file from ABC to file XYZ?

A. mv ABC XYZ
B. move ABC XYZ
C. cp ABC XYZ
D. rm ABC XYZ

Q-10. Which structure on the disk stores the attributes related to a file?

A. inode
B. Data block
C. Block in a file
D. Directory

Q-11. How many links can be created for a new directory?

A. 1
B. 2
C. 3
D. 4

Q-12. Which statement will stand false for the command <ln file1 file2>?

A. Both files have the same inode number.
B. The number of links for file 1 is 1.
C. The number of links for file 1 is 2.
D. The number of links for file 2 is 2.

Q-13. What happens if we delete a file carrying two hard links?

A. Can access the file with hl and h2 but not with sl.
B. Can access the file with hl and h2 but with sl.
C. Can access the file with any of hl, h2, or sl.
D. Can access the file with any of hl, h2, and sl.

Q-14. Which structure has two files pointing to it?

A. Soft links
B. Hard links
C. Alias
D. Special files

Q-15. Which statement is true for the creation of hard links?

A. Allowed only to the root user.
B. Can be done by all users.
C. The effects are unspecified.
D. Not allowed.

Q-16. Where are the printer devices rest in a Linux file system?

A. /etc
B. /dev
C. /lib
D. /printer

So far, you have checked out 16 basic Linux questions. In order to access the remaining questions, please click the next button.

Also Read: Linux Commands Cheat Sheet

Q:17-24 Basic Linux Questions

Q-17. Which of the following commands is used to update the modification time of a file?

A. time
B. modify
C. cat
D. touch

Q-18. Which of the following statements holds true for the ln command?

A. Creates a file pointing to an existing file.
B. Creates a file as a copy of an existing file.
C. Moves the file from one location to another.
D. Used to rename a file.

Q-19. Which of the following statements holds true for file permission 764?

A. All – Read | Group – Execute | Owner – Read and Write
B. All – Read and Write | Owner – Execute.
C. All – Read | Group & Owner – Write | Owner – Execute.
D. All – Read, Write, and Execute.

Q-20. Which of the following correctly represents the permission for the given octal expression?

-rwxr–r–

A. 777
B. 666
C. 744
D. 711

Q-21. Which of the following permissions can be used to set the effective group ID?

A. 0777
B. 2666
C. 4744
D. 1711

Q-22. Which of the following permissions can be used to set the Sticky bit?

A. 0777
B. 2666
C. 4744
D. 1711

Q-23. What will be the permissions of a new directory with the umask value as 0002?

A. 777
B. 775
C. 774
D. 664

Q-24. What is the default permission assigned to a newly created file with a umask value of 112?

A. —x–x-wx
B. -rw-rw-r–
C. -r-xr-x-r–
D. -rw-rw-r–

So far, you have checked out 24 basic Linux questions. In order to access the remaining questions, please click the next button.

Try This: 7 Programmer Friendly Linux Commands

Q:25-32 Basic Linux Questions

Q-25. What is the correct command for assigning the read-write permission to the owner?

A. chmod a+r file
B. chmod o+r file
C. chmod u=rw file
D. chmod og-r file

Q-26. Which of the following statements holds true for the command given below?

$ chmod o-w testfile

A. Set Write Permission for All
B. Set Write Permission for Others
C. Clear Write Permission for All
D. Clear Write Permission for Others

Q-27. What does the following command accomplish?

$ chmod +x testfile.txt

A. Provide “execute” permissions to the user running the command.

B. Assign “execute” permissions to the owner of the file.
C. Set “execute” permissions for all the users (i.e. user, group, and others).
D. None

Q-28. Which of the following commands determines the usage of a file system in Linux?

A. mount
B. df
C. du
D. dd

Q-29. Which of the following enables fast file system recovery?

A. ext2
B. Journaling
C. Caching
D. sysfs

Q-30. Which file system allows kernel parameters to change at runtime using the “sysctl” command?

A. ext3
B. sysfs
C. ext4
D. procfs

Q-31. Which of the following articulates the difference between the Linux and the Windows file system?

A. Linux detects a partition at boot-time and assigns a drive letter. But in Windows, you mount the partition first.
B. Windows detects a partition at boot time and assigns a drive letter. Whereas in Linux, you mount the partition first.
C. Windows detects a partition at reboot and obtains a drive letter. Whereas in Linux, you mount the partition first.
D. Windows detects a partition at reboot and assigns a drive letter. Whereas in Linux, you mount a partition first.

Q-32. Which of the following commands returns the current values of shell variables in a console session?

A. echo
B. env
C. val
D. export

Answer Key – Basic Linux Questions

(1) Answer. C (2) Answer. B
(3) Answer. A (4) Answer. A
(5) Answer. C (6) Answer. B
(7) Answer. D (8) Answer. C
(9) Answer. A (10) Answer. A
(11) Answer. B (12) Answer. B
(13) Answer. A (14) Answer. B
(15) Answer. D (16) Answer. B
(17) Answer. D (18) Answer. A
(19) Answer. A (20) Answer. C
(21) Answer. A (22) Answer. D
(23) Answer. B (24) Answer. D
(25) Answer. C (26) Answer. D
(27) Answer. C (28) Answer. B
(29) Answer. B (30) Answer. D
(31) Answer. B (32) Answer. B

Summary – Basic Linux Questions and Answers for Freshers

We are hopeful that the above basic Linux questions and answers will help you immensely. And you’ll do well in your upcoming interviews. It would be great if you let us know your feedback on this post.

Also, you can ask us to write on a topic of your choice. We’ll add it to our writing roadmap. Lastly, if you enjoyed the post, then please care to share it with friends and on social media.

All the Best,

TechBeamers

You Might Also Like

Basic Linux Commands for Beginners With Examples

How to Use Bash to Replace Character in String

Simple Bash Scripting Tutorial for Beginners

20 Bash Script Code Challenges for Beginners with Their Solutions

Difference Between Git Repository and Directory

TAGGED:Basic Commands for BeginnersLinux Fresher Questions
Meenakshi Agarwal Avatar
By Meenakshi Agarwal
Follow:
Hi, I'm Meenakshi Agarwal. I have a Bachelor's degree in Computer Science and a Master's degree in Computer Applications. After spending over a decade in large MNCs, I gained extensive experience in programming, coding, software development, testing, and automation. Now, I share my knowledge through tutorials, quizzes, and interview questions on Python, Java, Selenium, SQL, and C# on my blog, TechBeamers.com.
Previous Article 50+ terminal commands for linux and mac osx 50+ Linux/macOS Terminal Commands
Next Article Java Coding Questions to Assess Programming Skills 30 Java Coding Questions for Programmers

Popular Tutorials

SQL Interview Questions List
50 SQL Practice Questions for Good Results in Interview
SQL Interview Nov 01, 2016
Demo Websites You Need to Practice Selenium
7 Sites to Practice Selenium for Free in 2024
Selenium Tutorial Feb 08, 2016
SQL Exercises with Sample Table and Demo Data
SQL Exercises – Complex Queries
SQL Interview May 10, 2020
Java Coding Questions for Software Testers
15 Java Coding Questions for Testers
Selenium Tutorial Jun 17, 2016
30 Quick Python Programming Questions On List, Tuple & Dictionary
30 Python Programming Questions On List, Tuple, and Dictionary
Python Basic Python Tutorials Oct 07, 2016
//
Our tutorials are written by real people who’ve put in the time to research and test thoroughly. Whether you’re a beginner or a pro, our tutorials will guide you through everything you need to learn a programming language.

Top Coding Tips

  • PYTHON TIPS
  • PANDAS TIPSNew
  • DATA ANALYSIS TIPS
  • SELENIUM TIPS
  • C CODING TIPS
  • GDB DEBUG TIPS
  • SQL TIPS & TRICKS

Top Tutorials

  • PYTHON TUTORIAL FOR BEGINNERS
  • SELENIUM WEBDRIVER TUTORIAL
  • SELENIUM PYTHON TUTORIAL
  • SELENIUM DEMO WEBSITESHot
  • TESTNG TUTORIALS FOR BEGINNERS
  • PYTHON MULTITHREADING TUTORIAL
  • JAVA MULTITHREADING TUTORIAL

Sign Up for Our Newsletter

Subscribe to our newsletter to get our newest articles instantly!

Loading
TechBeamersTechBeamers
Follow US
© 2024 TechBeamers. All Rights Reserved.
  • About
  • Contact
  • Disclaimer
  • Privacy Policy
  • Terms of Use
TechBeamers Newsletter - Subscribe for Latest Updates
Join Us!

Subscribe to our newsletter and never miss the latest tech tutorials, quizzes, and tips.

Loading
Zero spam, Unsubscribe at any time.
x