Main Page | See live article | Alphabetical index

Chown

Chown is the unix command for Change Ownership. It marks a file as being owned by someone else.

In most Unix machines, it is assumed that more than one person will be using the machine at any time, and that they might want to share files. I might want to give, say, my report on the company's economics to my boss, or Bill from accounting. I want him to be able to treat it as if it were his.

So I sit down at my terminal.

wiki@blah.com:~$ ls
report otherstuff/
wiki@blah.com:~$ chown bill:bill report
wiki@blah.com:~$

 The report is now owned by bill.   Now I have to give it to him.

wiki@blah.com:~$ mv report ~bill
wiki@blah.com:~$

 That command moved the report to bill's directory.  Now he can read it at his leasure.

wiki@blah.com:~$ logout
 And I'm done using my terminal.   better not let anyone sit down and pretend to be me.

Chown also has a manual available.