In Unix, the command to enable execution permission for file "mylife" by all…

2015

In Unix, the command to enable execution permission for file "mylife" by all is________ .

  1. A.

    Chmod ugo + X mylife

  2. B.

    Chmod a + X mylife

  3. C.

    Chmod + X mylife

  4. D.

    All of the above

Attempted by 49 students.

Show answer & explanation

Correct answer: D

Answer: Use chmod a+x mylife (other equivalent forms listed below also work).

  • chmod a+x mylife — adds execute permission for all (a = user, group, others).

  • chmod ugo+x mylife — explicitly lists user (u), group (g) and others (o); +x adds execute permission.

  • chmod +x mylife — when no class is specified, chmod applies the change to all classes (equivalent to a+x).

Note: Use lowercase 'chmod' and do not put spaces between the class, operator and mode. For example, write chmod a+x mylife rather than Chmod a + X mylife.

Explore the full course: Nta Ugc Net Paper 2

Loading lesson…