Skip to content

Instantly share code, notes, and snippets.

@yamingd
Last active August 29, 2015 14:07
Show Gist options
  • Save yamingd/b6755742e817f68c40f6 to your computer and use it in GitHub Desktop.
Save yamingd/b6755742e817f68c40f6 to your computer and use it in GitHub Desktop.
Linux common commands
iptables:
--------------------------------------------------------------------------------
/etc/init.d/iptables save
This will save all rules in /etc/sysconfig/iptables, then just enable the iptables service at start-up using:
/sbin/iptables-save > /etc/iptables.rules
/sbin/iptables-restore < /etc/iptables.rule
hostname:
--------------------------------------------------------
/etc/sysconfig/network file.
/etc/hosts file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment