Change Owners and Groups Together
We can change the owner and group for a file or directory with this command:
$ sudo chown dev:dev test.txt
Now, the owner and group of 'test.txt' will be the 'dev' user and 'dev' group, respectively.
h/t Jack Christensen
Tweet