Practice high-yield Computer Science & IT MCQs on Linux — Part 1 with worked academic solutions for PPSC, FPSC, CSS, PMS, NTS.
Questions
40
Difficulty Level
Exam-Level
Target Exams
PPSC, FPSC, CSS...
Estimated Time
48 mins
Exam-Level PPSC FPSC CSS PMS NTS
Verified for Commission Syllabus • Oct 14, 2026
40
Verified Practice Questions
Interactive test mode with detailed academic worked solutions
Live Progress|0/40 answered
✓0 correct
✗0 wrong
0% score
🎉 Set complete! All 40 questions answered.
Question 1 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What command is used to count the total number of lines, words, and characters contained in a file?
Correct Answer: Option C — wc
Detailed Academic Explanation:
The wc command is used to count the total number of lines, words, and characters contained in a file. Using this command, you can quickly get statistics about a file's content, which is useful for various purposes, such as analyzing text files or checking the size of files. It stands for "word count," but it can also count lines and characters depending on the options provided. So, in summary, to count lines, words, and characters in a file, you'd use the wc command in Linux.
💡Key Conceptual Anchor:Linux
Question 2 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What command is used to remove files?
Correct Answer: Option B — rm
Detailed Academic Explanation:
The rm command is used to remove files in Linux. It stands for "remove". When you want to delete a file from your system, you use the rm command followed by the filename. It's a powerful command and should be used with caution as it permanently deletes files without moving them to a trash or recycle bin. So, in summary, to remove files in Linux, you'd use the rm command.
💡Key Conceptual Anchor:Linux
Question 3 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What command is used to remove the directory?
Correct Answer: Option D — rmdir
Detailed Academic Explanation:
The rmdir command is used to remove directories in Linux. When you want to delete an empty directory from your system, you use the rmdir command followed by the directory name. It stands for "remove directory". It's important to note that this command only works for empty directories. If the directory contains any files or other directories, you need to use the rm command with appropriate options to remove them. So, in summary, to remove directories in Linux, you'd use the rmdir command.
💡Key Conceptual Anchor:Linux
Question 4 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What command is used with vi editor to delete a single character?
Correct Answer: Option A — x
Detailed Academic Explanation:
In the vi editor, the x command is used to delete a single character. When you are in command mode in the vi editor, pressing x will delete the character under the cursor. This command is useful for making small edits or corrections within a file. So, in summary, to delete a single character in vi editor, you'd use the x command.
💡Key Conceptual Anchor:Linux
Question 5 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What hardware architectures are not supported by Red Hat?
Correct Answer: Option C — Alpha
Detailed Academic Explanation:
Red Hat does not support the Alpha hardware architecture. While Red Hat supports various hardware architectures like SPARC, IBM-compatible (x86 and x86_64), and some Macintosh systems, it does not provide support for the Alpha architecture. It's important to verify hardware compatibility when choosing an operating system, as not all architectures may be supported. So, in summary, among the options provided, the architecture not supported by Red Hat is Alpha .
💡Key Conceptual Anchor:Linux
Question 6 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
The physical layer of a network
Correct Answer: Option C — defines the electrical characteristics of signals passed between the computer and communication devices
Detailed Academic Explanation:
The physical layer of a network is responsible for defining the electrical, mechanical, procedural, and functional specifications for activating, maintaining, and deactivating the physical link between communicating network systems. It deals with the transmission and reception of unstructured raw data over a physical medium. This layer defines details such as voltage levels, timing of voltage changes, physical data rates, maximum transmission distances, and other similar attributes that are required to transfer the raw bit stream over a physical medium between devices. In summary, the physical layer primarily focuses on the physical aspects of transmitting data, such as electrical signals and mechanical connections.
💡Key Conceptual Anchor:Linux
Question 7 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What TCP/IP protocol is used for remote terminal connection service?
Correct Answer: Option D — TELNET
Detailed Academic Explanation:
TELNET is the TCP/IP protocol used for remote terminal connection service. It allows users to log in remotely to another computer over a network and access its resources as if they were directly connected to that computer. TELNET operates on the application layer of the TCP/IP model and provides a virtual terminal connection, enabling users to execute commands on a remote system. It's important to note that TELNET transmits data, including passwords, in plain text, which makes it less secure compared to other remote access protocols like SSH (Secure Shell). So, in summary, for remote terminal connection service, the TCP/IP protocol used is TELNET .
💡Key Conceptual Anchor:Linux
Question 8 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
How many networks and nodes per network, are allowed by the Class B network?
Correct Answer: Option B — 16,384 networks and 65,534 nodes per network
Detailed Academic Explanation:
In Class B networks, the IP address space is divided into a large number of smaller networks, each with a moderate number of hosts. A Class B network uses a 16-bit network prefix, allowing for 65,534 possible host addresses per network. The total number of possible Class B networks is calculated as 214214, which equals 16,384 networks. So, in summary, for a Class B network, there are 16,384 networks and 65,534 nodes per network .
💡Key Conceptual Anchor:Linux
Question 9 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What service is used to translate domain names to IP addresses?
Correct Answer: Option D — DNS
Detailed Academic Explanation:
DNS stands for Domain Name System, and it is the service used to translate domain names to IP addresses. DNS acts as a distributed database that maps human-readable domain names (like example.com) to IP addresses (like 192.0.2.1) that computers use to communicate with each other over a network. When you type a domain name into your web browser, your computer queries DNS servers to obtain the corresponding IP address, allowing it to connect to the appropriate web server. So, in summary, to translate domain names to IP addresses, you'd use the DNS service.
💡Key Conceptual Anchor:Linux
Question 10 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following command is used to create a Linux installation hoot floppy?
Correct Answer: Option D — dd and rawrite
Detailed Academic Explanation:
To create a Linux installation boot floppy, you would typically use the dd command on Unix-like systems or rawrite command on Windows systems. The dd command is a versatile utility used for copying and converting files. In this case, it can be used to copy the installation image to the floppy disk. On Windows systems, rawrite is a command-line tool used to write raw disk images to removable media such as floppy disks. So, in summary, to create a Linux installation boot floppy, you would use dd on Unix-like systems and rawrite on Windows systems.
💡Key Conceptual Anchor:Linux
Question 11 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
How can you add Amit, a new user, to your system?
Correct Answer: Option D — All of the above
Detailed Academic Explanation:
You can add a new user named Amit to your Linux system using multiple methods. Using useradd: This is a command-line utility for adding new users to the system. You would typically use it like this: useradd Amit . This command adds the user Amit to the system. Using adduser: This is another command-line utility that provides a more interactive way to add users. You would typically use it like this: adduser Amit . This command guides you through the process of adding a new user. Using linuxconf: This is a graphical configuration tool that can be used to manage various aspects of a Linux system, including user management. It provides a GUI interface for tasks like adding users. However, note that linuxconf is not as commonly used as the other methods mentioned above. So, in summary, you can add Amit, a new user, to your Linux system using useradd , adduser , or linuxconf . Therefore, the correct answer is All of the above .
💡Key Conceptual Anchor:Linux
Question 12 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What file specifies the order in which to use specified name services?
Correct Answer: Option C — /etc/nsswitch.conf
Detailed Academic Explanation:
The /etc/nsswitch.conf file specifies the order in which to use specified name services in Linux. This file controls how the system resolves various services, such as hostnames, user names, and group names, by defining the sources to query in a specific order. For example, it determines whether to look in files like /etc/hosts or to query DNS servers for hostname resolution. By configuring this file, administrators can control the order in which different name resolution methods are attempted, providing flexibility and customization. So, in summary, the file that specifies the order of name services is /etc/nsswitch.conf .
💡Key Conceptual Anchor:Linux
Question 13 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
How many primary partitions can exist on one drive?
Correct Answer: Option B — 4
Detailed Academic Explanation:
On a traditional Master Boot Record (MBR) partitioning scheme, which is commonly used for BIOS-based systems, you can have a maximum of 4 primary partitions on one drive. These primary partitions are used to define the basic structure of the disk and can be formatted with a file system to store data. If you need more partitions, you can create extended partitions, which are special primary partitions that can hold multiple logical partitions within them. However, with newer GUID Partition Table (GPT) partitioning schemes used on UEFI-based systems, you can have many more partitions, theoretically up to 128 partitions per disk. So, in summary, on a traditional MBR partitioning scheme, you can have a maximum of 4 primary partitions on one drive.
💡Key Conceptual Anchor:Linux
Question 14 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
In which directory can you store system user default files used for creating user directories?
Correct Answer: Option C — /etc/skel
Detailed Academic Explanation:
In Linux, the directory /etc/skel is used to store system user default files that are used as templates when creating new user directories. When a new user is created, their home directory is typically populated with files and directories from /etc/skel . These files often include configuration files, such as .bashrc or .profile, that provide default settings for the user's environment. By placing default files in /etc/skel , administrators can ensure that new user accounts are set up with consistent configurations and environments. So, in summary, the directory where system user default files are stored for creating user directories is /etc/skel .
💡Key Conceptual Anchor:Linux
Question 15 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
How could you install the file ipchains-1.3.9-5.i386.rpm?
Correct Answer: Option C — rpm -i ipchains* .i386.rpm
Detailed Academic Explanation:
To install the file ipchains-1.3.9-5.i386.rpm, you would use the rpm -i command followed by the name of the RPM file. The -i option stands for "install", and it tells the RPM package manager to install the specified package. So, the correct command would be rpm -i ipchains-1.3.9-5.i386.rpm . Additionally, the asterisk () after "ipchains" in the option implies wildcard matching, which can help if there are multiple versions of the package or if there are additional characters appended to the filename. So, in summary, to install the ipchains package, you would use rpm -i ipchains .i386.rpm .
💡Key Conceptual Anchor:Linux
Question 16 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What does FSF stand for?
Correct Answer: Option D — Free Software Foundation
Detailed Academic Explanation:
FSF stands for Free Software Foundation. The Free Software Foundation (FSF) is a nonprofit organization founded by Richard Stallman in 1985. It promotes the development and use of free (as in freedom) software and campaigns against proprietary software and software patents. The FSF is best known for its work on the GNU Project, which aims to create a free Unix-like operating system compatible with the Unix operating system. So, in summary, FSF stands for Free Software Foundation .
💡Key Conceptual Anchor:Linux
Question 17 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following is a valid format for mounting a CD-ROM drive?
Correct Answer: Option D — All of the above
Detailed Academic Explanation:
The correct answer is Option A: mount -t iso9660 /dev/cdrom /mnt/cdrom . This command is a valid format for mounting a CD-ROM drive in Linux. Here's what each part of the command does: mount : Command used to mount filesystems. -t iso9660 : Specifies the filesystem type, in this case, ISO 9660, which is the standard filesystem format for CD-ROMs. /dev/cdrom : Specifies the device file for the CD-ROM drive. /mnt/cdrom : Specifies the mount point, which is the directory where the CD-ROM contents will be accessible after mounting. So, in summary, the command mount -t iso9660 /dev/cdrom /mnt/cdrom is used to mount a CD-ROM drive in Linux.
💡Key Conceptual Anchor:Linux
Question 18 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What command do you use to create Linux file systems?
Correct Answer: Option B — mkfs
Detailed Academic Explanation:
mkfs is the correct answer to “What command do you use to create Linux file systems”. This question is standard in competitive examination syllabi for Linux.
💡Key Conceptual Anchor:Linux
Question 19 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following command can you execute to count the number of lines in a file?
Correct Answer: Option B — wc - l
Detailed Academic Explanation:
wc - l is the correct answer to “Which of the following command can you execute to count the number of lines in a file”. This question is standard in competitive examination syllabi for Linux.
💡Key Conceptual Anchor:Linux
Question 20 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following is not a communication command?
Correct Answer: Option A — grep
Detailed Academic Explanation:
grep is the correct answer to “Which of the following is not a communication command”. This question is standard in competitive examination syllabi for Linux.
💡Key Conceptual Anchor:Linux
Question 21 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What command is used to display the characteristics of a process?
Correct Answer: Option B — ps
Detailed Academic Explanation:
ps is the correct answer to “What command is used to display the characteristics of a process”. This question is standard in competitive examination syllabi for Linux.
💡Key Conceptual Anchor:Linux
Question 22 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What command is not used to list the files chap01, chap02 and chap04?
Correct Answer: Option B — ls chap[124]
Detailed Academic Explanation:
ls chap[124] is the correct answer to “What command is not used to list the files chap01, chap02 and chap04”. This question is standard in competitive examination syllabi for Linux.
💡Key Conceptual Anchor:Linux
Question 23 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What command is used with vi editor to replace text from cursor to right
Correct Answer: Option C — None of the above
Detailed Academic Explanation:
None of the above is the correct answer to “What command is used with vi editor to replace text from cursor to right”. This question is standard in competitive examination syllabi for Linux.
💡Key Conceptual Anchor:Linux
Question 24 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What sign is used to back up over typing errors in vi?
Correct Answer: Option C — #
Detailed Academic Explanation:
# is the correct answer to “What sign is used to back up over typing errors in vi”. This question is standard in competitive examination syllabi for Linux.
💡Key Conceptual Anchor:Linux
Question 25 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What sign is used to erase or kill an entire line you have typed and start you are on a new line (but not display a new prompt)?
Correct Answer: Option D — @
Detailed Academic Explanation:
@ is the correct answer to “What sign is used to erase or kill an entire line you have typed and start you are on a new line (but not display a new prompt)”. This question is standard in competitive examination syllabi for Linux.
💡Key Conceptual Anchor:Linux
Question 26 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What command is used to sort the lines of data in a file in alphabetical order?
Correct Answer: Option D — sort
Detailed Academic Explanation:
sort is the correct answer to “What command is used to sort the lines of data in a file in alphabetical order”. This question is standard in competitive examination syllabi for Linux.
💡Key Conceptual Anchor:Linux
Question 27 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What command is used with vi editor to save file and remain in the editing mode?
Correct Answer: Option C — :w
Detailed Academic Explanation:
:w is the correct answer to “What command is used with vi editor to save file and remain in the editing mode”. This question is standard in competitive examination syllabi for Linux.
💡Key Conceptual Anchor:Linux
Question 28 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What command is used with vi editor to move back to the beginning of a word?
Correct Answer: Option D — b
Detailed Academic Explanation:
b is the correct answer to “What command is used with vi editor to move back to the beginning of a word”. This question is standard in competitive examination syllabi for Linux.
💡Key Conceptual Anchor:Linux
Question 29 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What command is used with vi editor to search a pattern in the forward direction?
Correct Answer: Option D — /
Detailed Academic Explanation:
/ is the correct answer to “What command is used with vi editor to search a pattern in the forward direction”. This question is standard in competitive examination syllabi for Linux.
💡Key Conceptual Anchor:Linux
Question 30 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What command is used to add printing jobs to the queue?
Correct Answer: Option B — lpr
Detailed Academic Explanation:
lpr is the correct answer to “What command is used to add printing jobs to the queue”. This question is standard in competitive examination syllabi for Linux.
💡Key Conceptual Anchor:Linux
Question 31 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What protocol(s) is(are) allowed a user to retrieve her/his mail from the mail server to her/his mail reader?
Correct Answer: Option A — POP3
Detailed Academic Explanation:
POP3 is the correct answer to “What protocol(s) is(are) allowed a user to retrieve her/his mail from the mail server to her/his mail reader”. This question is standard in competitive examination syllabi for Linux.
💡Key Conceptual Anchor:Linux
Question 32 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What project is currently developing X server support?
Correct Answer: Option A — XFree86 Project, Inc.
Detailed Academic Explanation:
XFree86 Project, Inc. is the correct answer to “What project is currently developing X server support”. This question is standard in competitive examination syllabi for Linux.
💡Key Conceptual Anchor:Linux
Question 33 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What X-based tool is available for configuring the X Window system?
Correct Answer: Option B — XF86Setup
Detailed Academic Explanation:
XF86Setup is the correct answer to “What X-based tool is available for configuring the X Window system”. This question is standard in competitive examination syllabi for Linux.
💡Key Conceptual Anchor:Linux
Question 34 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following server is used with the BIND package?
Correct Answer: Option D — named
Detailed Academic Explanation:
named is the correct answer to “Which of the following server is used with the BIND package”. This question is standard in competitive examination syllabi for Linux.
💡Key Conceptual Anchor:Linux
Question 35 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What port does squid listen, by default?
Correct Answer: Option D — 3128
Detailed Academic Explanation:
3128 is the correct answer to “What port does squid listen, by default”. This question is standard in competitive examination syllabi for Linux.
💡Key Conceptual Anchor:Linux
Question 36 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following is the main Apache configuration file?
Correct Answer: Option C — /etc/httpd/conf/httpd.conf
Detailed Academic Explanation:
/etc/httpd/conf/httpd.conf is the correct answer to “Which of the following is the main Apache configuration file”. This question is standard in competitive examination syllabi for Linux.
💡Key Conceptual Anchor:Linux
Question 37 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following command is used to access an SMB share on a Linux system?
Correct Answer: Option C — smbclient
Detailed Academic Explanation:
smbclient is the correct answer to “Which of the following command is used to access an SMB share on a Linux system”. This question is standard in competitive examination syllabi for Linux.
💡Key Conceptual Anchor:Linux
Question 38 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following command is used to see the services running in NFS server?
Correct Answer: Option A — rpcinfo
Detailed Academic Explanation:
rpcinfo is the correct answer to “Which of the following command is used to see the services running in NFS server”. This question is standard in competitive examination syllabi for Linux.
💡Key Conceptual Anchor:Linux
Question 39 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
In which tcp_wrappers file can you specify to allow all connections from all hosts?
Correct Answer: Option A — /etc/hosts.allow
Detailed Academic Explanation:
/etc/hosts.allow is the correct answer to “In which tcp_wrappers file can you specify to allow all connections from all hosts”. This question is standard in competitive examination syllabi for Linux.
💡Key Conceptual Anchor:Linux
Question 40 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
What does GNU stand for?
Correct Answer: Option A — GNU's not Unix
Detailed Academic Explanation:
GNU's not Unix is the correct answer to “What does GNU stand for”. This question is standard in competitive examination syllabi for Linux.
💡Key Conceptual Anchor:Linux
✓Link copied to clipboard
Continue Your Practice
Advanced Mapreduce Concepts — Part 1
Master the next curriculum module with 40 exam-standard MCQs.
In competitive commission exams (FPSC, PPSC, KPPSC, SPSC, CSS, PMS), questions are frequently phrased with distractor options designed to catch rote learners. Whenever you answer an MCQ, read the Detailed Academic Explanation and Conceptual Anchor to understand why the remaining options are incorrect.