Most of the time you login into remote server via ssh. If you start a shell script or command and you exit (abort remote connection),
the process will get killed. Sometime job or command takes a long time. you are not sure when the job will finish. if you logout the system,
nohup is better to leave job running after exit.
| nohup command-name & |
Examples:
The easilst way is to empty root & users email message file
i.e. /var/spool/mail/root or /var/spool/mail/<username>.
There are two ways to delete all messages.
1.mail command & delete command :
Login linux as the user .
|
d 1-100 --> if you delete from 1 to 100, |
2. Simply type the following command at shell :
The Yellowdog Updater, Modified (YUM) is an open-source command-line package-management utility for RPM-compatible Linux operating systems
and has been released under the GNU General Public License. Suddenly you can not update any packaged by yum.
So you need to clear yum cache with the following command. Probably after thet, you would undate old packages.
This explains how to use Telnet to test Simple Mail Transfer Protocol (SMTP) communication between messaging servers. By default,
SMTP listens on port 25. If you use Telnet on port 25, you can enter the SMTP commands that are used to connect to an SMTP server
and send a message exactly as if your Telnet session was an SMTP messaging server. You can see the success or failure of each
step in the connection and message submission process.
1. Redhat
Next enter the following three commands to disable firewall.
| # service iptables save # service iptables stop # chkconfig iptables off |
For IPv6
| # service ip6tables save # service ip6tables stop # chkconfig ip6tables off |
2. Ubuntu
1. How to halt/stop user called user01
| # skill -STOP -u user01 |
2. How to resume already halted user called iser01
Send CONT single to user user01, type the following command:
| # skill -CONT -u user01 |
3.How to kill and logout user called user01
System administration command. Restore backed up files from a dump archiv.
Execure this command with one of the following flags.
1. Restart Rescue Mode by Installation DVD(or CDROM)
2. Mount an external device or NFS to access dump files.
Ex. Like USB and so on which has dump files for restore.
1. Create Snapshot first.
Before creating a snapshot, please check the disk space of volume group.
|
# vgdisplay .......... Total PE 4347 |
System administrator command. Read or set the hardware clock.
This command maintains change information on /etc/adjtime, which can be used to ajust the clock based on how much
it drifts over time.
There is also a hardware clock (CMOS clock). You can look at the current hardware clock time with:
| # hwclock --show |
To set the hardware clock from the system clock, leaving the hardware clock in UTC, enter the following:
1. Open x connection from a remote server.
* Make sure x window system is running in the local host.
| # xhost + (accept any target hosts.) |
| # xhost [host_name1] [host_name2] (accept a specific target host.) |
2. Login a target server with ssh.