Post icon

Changing Ownership Using Terminal

Getting used to your way around Terminal? Starting to wonder about some other useful tips for it? Terminal provides a quick and easy way to change file ownership. This tutorial will tell you exactly how to do it.

Warning: Using Terminal can be very dangerous and is for advanced users only. Be very, very careful with what you do in Terminal as you can cripple your Operating System. Also, note that these commands below can only be performed if you have Admin access.

  1. The first step is to navigate to your file. If you already know the full path of the file, all the better. Once you know where your file is, type in sudo chown username:group path/to/file.extension In my example, I would type sudo chown admin:staff myFile.txt Then hit enter. You may be required to enter your admin password.Enter your chown commands and hit enter.
  2. If everything goes right you won’t get any error messages. Do a ls -al command and you will notice your changes.Check your changes with an ls -al command

That’s it, simple and easy.

Leave a Reply