Skip to content
GK24
Computer AwarenessMedium

Which Linux command is used to list the processes running on the system?

  1. A.ps
  2. B.df
  3. C.du
  4. D.ln

Correct answer

A. ps

Explanation

The correct answer is A, ps. The command ps, short for process status, prints a list of processes with their process identification numbers, the terminal they belong to, the processor time used and the command that started each one. The related command top shows the same information refreshed continuously, and kill followed by a process identification number ends a process. Option B is wrong because df, for disk free, reports how much space is used and available on each mounted file system. Option C is wrong because du, for disk usage, reports how much space a particular directory and its contents occupy. Option D is wrong because ln creates a link to a file, either a hard link, which is another directory entry for the same data, or a symbolic link made with the option s, which merely points to the original path.

Read the full article: MS-DOS and Linux Commands: Internal, External and Shell

View all
Q5.Computer AwarenessMedium

In Linux, the command chmod 777 on a file gives which set of permissions?

  1. A.Read and write to the owner only
  2. B.Read, write and execute to the owner, the group and others
  3. C.Read and execute to everyone, write to nobody
  4. D.Execute to the owner, read to the group, nothing to others
Show answer
Correct answer: B. Read, write and execute to the owner, the group and others

In the numeric form of chmod each of the three digits stands for one set of users, in the order owner, group and others, and each digit is the sum of read as 4, write as 2 and execute as 1.