Open your terminal gnome-terminal Type date for show the current date and time date Tue Apr 12 Mon Mar 16:00:00 GMT 2011 To change the […]
Category: Linux
How to add a service on Linux using chkconfig
Add a service to auto start in linux Add the below #comment lines on top of the script which always located /etc/init.d/ #chkconfig: 2345 20 […]
Change 404 Page on Apache – Linux
Use the ErrorDocument directive in your conf file to set a custom error message. The easiest way to do this: Create a file with your […]
Sendmail Masquerading
After install sendmail .. follow the below procedure to simply avoid your emails to get spammed. Also avoid email address to shown as root@example.domain.com with […]
Disable Suspend and Hibernate – Ubuntu
Open a Terminal from Applications>Accessories>Terminal. Become a root with su – or sudo su – vim /usr/share/polkit-1/actions/org.debian.aptxapianindex.policy Find the lines: <allow_active>yes</allow_active> Change this entry from […]
Disable screen going blank ubuntu server / Network timeout
Using setterm command. man setterm : writes to standard output a character string that will invoke the specified terminal capabilities. Where possible terminfo is conâ […]
Sendmail Linux Examples
Sendmail on the command line: $ sendmail emailaddress write body of message CTRL-D The CTRL-D is a end of message code for standard-in. Example : […]
Create tar and copy to another server using tar
Just a note Code: tar -cvf – test | ssh -l username domain.com “cd /home1/username && tar -xvf -“
Delete / remove old / order files in linux automatically
Code: find /tmp/test -ctime +60 -delete The above command will delete any files created over 60 days ago in the /tmp/test folder (and all subfolders). […]
Kill and Logout Users From linux
Open a terminal, and then type the following commands. Login as root su – or sudo su – and entering the root password. Type the […]