In Linux operating system environment ____ command is used to print a file.

2018

In Linux operating system environment ____ command is used to print a file.

  1. A.

    print

  2. B.

    ptr

  3. C.

    pr

  4. D.

    lpr

Attempted by 488 students.

Show answer & explanation

Correct answer: D

Answer: lpr

Explanation: The lpr command sends files to the printer on Unix/Linux systems by submitting the file to the print queue. It is the standard utility used to print a file from the command line.

  • Usage example: lpr filename

  • Alternative: Many systems also provide lp which performs a similar function (e.g., lp filename).

  • Note on pr: The pr command formats text for printing (adds headers and pagination) but does not itself send the file to the printer. To both format and print you could pipe pr into lpr, for example: pr file.txt | lpr.

  • Commands like print or ptr are not standard system printing utilities on Unix/Linux.

Tip: Use man lpr or lpr --help to see available options for your system's printing setup.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Nta Ugc Net Paper 2

Loading lesson…