This is just a collection of Linux commands that I compiled in one spot so I wouldn't keep having to go hunting for them. There are lots of different installs out there, so some of this might not work on your server, but hopefully it does and saves you some time.
How to Create a Symbolic Link
ln -s target linkname
How to Allow a Group (examplegroup) Access to a Folder
chown apache.examplegroup folder -R chmod 775 folder -R
How to Block a Group (examplegroup) From a Folder
chown apache.examplegroup folder -R chmod 705 folder -R
How to Restart Email Systems
sudo service dovecot restart sudo service sendmail restart
How To Restart Apache
sudo /etc/rc.d/init.d/httpd restart
How to Empty Your Mailbox
cd /var/spool/mail/ tail username > username
How to Add a User
/usr/sbin/useradd newusername passwd newusername
How to Delete a User
/usr/sbin/userdel -r user
How to See All Users
How to Add a Domain
cd /etc/httpd/conf/virtuals vi example.com.conf /etc/rc.d/init.d/httpd restart
This post was published on October 3rd, 2011 by Robert James Reese in the following categories: Apache, Linux.
Before using any of the code or other content in this post, you must read and agree to our Terms & Conditions.