The chown command (short for “change owner”) is a command used in Linux and Unix-based operating systems to change the ownership of a file or directory. The command takes two arguments: the first is the name of the user who will become the new owner of the file or directory, and the second is the file or directory whose ownership will be changed.
Here are some examples of how chown command can be used:
- To change the ownership of a file named file.txt to user named “yesterblog”:
chown yesterblog file.txt
- To change the ownership of a directory named documents to user named “yesterblog”:
chown -R yesterblog documents/
You can also use chown to change the group ownership of a file or directory. For example,
chown :groupname file.txt
It will change the group ownership of a file named file.txt to the group named groupname.
It is important to note that only the root user or the current owner of a file/directory can change the ownership using chown command.
Other Linux Commands
- admin Command
- alias Command
- apt Command
- ar Command
- asa Command
- at Command
- awk Command
- basename Command
- bash Command
- batch Command
- bc Command
- bg Command
- break Command
- c99 Command
- cal Command
- cat Command
- cd Command
- cflow Command
- chgrp Command
- chmod Command
- chown Command
- chroot Command
- cksum Command
- clear Command
- cmp Command
- comm Command
- command Command
- compress Command
- continue Command
- cp Command
- crontab Command
- csplit Command
- ctags Command
- cut Command
- cxref Command
- datamash Command
- date Command
- dc Command
- dd Command
- delta Command
- df Command
- diff Command
- dir Command
- dirname Command
- dot Command
- du Command
- echo Command
- ed Command
- env Command
- eval Command
- ex Command
- exec Command
- exit Command
- expand Command
- export Command
- expr Command
- false Command
- fc Command
- fg Command
- file Command
- find Command
- flex Command
- fold Command
- fort77 Command
- fortune Command
- ftp Command
- fuser Command
- gawk Command
- gencat Command
- get Command
- getconf Command
- getopts Command
- grep Command
- groupadd Command
- groupdel Command
- groups Command
- hash Command
- head Command
- history Command
- hostname Command
- htop Command
- iconv Command
- id Command
- iostat Command
- ipcrm Command
- ipcs Command
- jobs Command
- join Command
- kill Command
- last Command
- less Command
- lex Command
- link Command
- ln Command
- locale Command
- localedef Command
- locate Command
- logger Command
- login Command
- logname Command
- logout Command
- lp Command
- ls Command
- m4 Command
- mailx Command
- make Command
- man Command
- mesg Command
- mkdir Command
- mkfifo Command
- mktemp Command
- more Command
- mount Command
- mtail Command
- mv Command
- nano Command
- netstat Command
- newgrp Command
- nice Command
- nl Command
- nm Command
- nohup Command
- od Command
- parallel Command
- passwd Command
- paste Command
- patch Command
- pathchk Command
- pax Command
- pgrep Command
- ping Command
- pkill Command
- pr Command
- print Command
- printf Command
- prs Command
- ps Command
- pstree Command
- pwd Command
- qalter Command
- qdel Command
- qhold Command
- qmove Command
- qmsg Command
- qrerun Command
- qrls Command
- qselect Command
- qsig Command
- qstat Command
- qsub Command
- read Command
- readlink Command
- readonly Command
- renice Command
- return Command
- rm Command
- rmdel Command
- rmdir Command
- rsync Command
- sact Command
- sar Command
- sccs Command
- sed Command
- seq Command
- set Command
- sh Command
- shift Command
- shopt Command
- sleep Command
- sort Command
- split Command
- ss Command
- stress Command
- strings Command
- strip Command
- stty Command
- suspend Command
- tabs Command
- tail Command
- talk Command
- tee Command
- test Command
- time Command
- times Command
- top Command
- touch Command
- tput Command
- tr Command
- traceroute Command
- trap Command
- true Command
- ts Command
- tsort Command
- tty Command
- type Command
- ulimit Command
- umask Command
- umount Command
- unalias Command
- uname Command
- uncompress Command
- unexpand Command
- unget Command
- uniq Command
- unlink Command
- unset Command
- unzip Command
- uptime Command
- useradd Command
- userdel Command
- uucp Command
- uudecode Command
- uuencode Command
- uustat Command
- uux Command
- val Command
- vi Command
- w Command
- wait Command
- wc Command
- what Command
- whereis Command
- which Command
- who Command
- write Command
- xargs Command
- yacc Command
- zcat Command
- zip Command
- Linux Commands and Examples
0 Comments