Unit 2: System Utilities and Basic Commands - Subjective Questions

CSE105 — Creative Engineering Workshop • Practice Questions with Detailed Answers

20 questions

1

Explain the general structure of a Linux command. Describe each component with a suitable example.

2

Describe the cal command. Explain its important options with examples and outputs.

3

Explain the date command in detail. How can date be displayed in custom formats using format specifiers?

4

What is the purpose of the echo command? Explain its escape sequences and important options.

5

Distinguish between the echo and printf commands. Explain why printf is preferred for formatted output.

6

Explain the bc command as a command-line calculator. Demonstrate arithmetic operations, scale, and use in scripts.

7

Explain the expr command with examples. What are its limitations compared to bc?

8

Describe the script command. How is it used to record a terminal session? Explain with an example.

9

Explain the passwd command. Describe its role in user authentication and important options.

10

Distinguish between the who, whoami, and w commands. Explain the output fields of who.

11

Explain the uname command and its various options. What information does uname -a provide?

12

Explain the uptime command in detail. Interpret the meaning of the load average values it displays.

13

What is a terminal in Linux? Explain the tty command and the difference between tty and pts.

14

Explain the stty command. How is it used to change and view terminal settings? Give examples.

15

Explain the man command and describe how to navigate a manual page. What are the different sections of the man pages?

16

Compare internal (built-in) commands and external commands in Linux. How can you determine the type of a command?

17

Write short notes with examples on any four system information commands: date, uname, uptime, and whoami.

18

A shell script needs to perform both integer and floating-point calculations. Explain and demonstrate how expr and bc can be combined, and write example calculations for area of a circle and simple interest.

19

Explain in detail the concept of options and arguments in command structure, the difference between short and long options, and how combining options works. Support your answer with multiple examples.

20

Describe how the man command, apropos, whatis, and --help work together as sources of command documentation. Compare them and give examples of when to use each.