Basic Commands for Services

IPTABLES

To check firewall rule set using iptables:
iptables -L

To Flush/Clear the firewall rules:
iptables -F

Restarting the iptables service will flush the all the defined chain which is not loaded into kernel. Restart the iptables service using following command.

/etc/rc.d/init.d/iptables restart or
service iptables restart.

Usage: /etc/rc.d/init.d/iptables {start|stop|restart|condrestart|status|panic|save}

E-MAIL

How to test the mail account for the user created on mail server:
sendmail -bv user-name@domain-name

How to restart sendmail service:
/etc/rc.d/init.d/sendmail restart

Usage: /etc/rc.d/init.d/sendmail {start|stop|restart|condrestart|status}

RESTARTING FAILED SERVICES

How to restart exim service:
service exim restart

How to restart psa service:
service psa restart

How to restart Apache:
/etc/rc.d/init.d/httpd restart
or
service httpd restart

Usage: httpd {start|stop|restart|condrestart|reload|status|fullstatus|graceful|help|configtest}

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to use SSH

SSH is a tool used to connect to your server.   This is how 95% of your system is setup.To...

Setting the system date and clock

To set the system clock, use the date command.For Redhat Systems, use the following format: date...

Linux Command Line Cheat Sheet

Moving Around the FilesystemCommands for moving around the filesystem include the following....

What are some basic commands that I need to know to use Linux?

If you are new to shell (SSH), below are some commands to get you started. A full list of shell...

How can I check the number connections to a port from an IP?

While logged into your server via SSH as root you can run the following command: netstat...

Powered by WHMCompleteSolution