1. Linux environment variable (source/etc/profile immediate effect)
/etc/profile This file sets environment variables for each user of the system, and when the user first logs on, the file is executed and the shell settings are collected from the configuration file of the/ETC/PROFILE.D directory.
/etc/environment sets the environment for the entire system, and/etc/profile is the setting for all users, regardless of login, which is related to login
/ETC/BASHRC executes this file for each user running the bash shell, and the file is read when the bash Shell is opened
~/.bash_profile Each user can use this file to enter shell information dedicated to their own use, when the user logs on, the file is only executed once, by default, he sets some environment variables,
Executes the user's. bashrc file
~/.BASHRC The file contains bash information dedicated to your bash shell, which is read when you log in, and every time you open a new shell.
2. Linux Firewall
Chkconfig iptables on/off after reboot
Immediate effect Service Iptables Start/stop
Modify/etc/sysconfig/iptables
-A rh-firewall-1-input-m State--state NEW
-M TCP--dport 80-j ACCEPT
3. View Port
Netstat
-T display TCP port
-U UDP port
-L Show only listening sockets
-P Process
-N does not perform DNS, display IP
NETSTAT-NTLP View all current TCP ports
Netstat-ntulp | grep 80 View all 80 port usage
Netstat-an | grep 3306 View 3306 port usage
Basic Linux Operations