//linux View End Share populationPs-aux | grep <text>
Netstat–apn
//Kill processKill-9 <PID>
//System encoding settings (GBK, UTF-8)Locale View encoding settings if you are unable to run Locale-gen, run the following command Apt-get purge localesapt-get autocleanapt-get install locales
Modify the default Chinese encoding character: Vi/etc/profileexport lc_all= "ZH_CN. GBK "Export lang=" ZH_CN. GBK "Export language=" Zh_CN:zh:en_US:en " or vi/etc/environmentlang= "ZH_CN. GBK "language=" Zh_CN:zh:en_US:en "
Add character encoding: 1. Use Locale-gen Locale-gen ZH_CN directly. GBK2. Modify the/var/lib/locales/supported.d/local file to add the Chinese character set at the end of the file Zh_cn GBK save dpkg-reconfigure locales restart after exiting
//Firewall port mappingIptables-t nat-a prerouting-p tcp--dport 80-j REDIRECT--to-port 8080
//user and user group managementUser-related profiles:/etc/passwd Note: User profile;/etc/shadow Note: User shadow password file;
Profiles related to user groups:/etc/group Note: User group profile;/etc/gshadow Note: Shadow files for user groups (group);
$ sudo useradd - g DDC [User name] #-- ------------Add a new user
$ sudo passwd [user name] #--------------Create a password for a new user
$ sudo usermod -g ddcuser [用户名] #--------------将新用户改为ddcuser组
#新用户修改自己的密码:
$ passwd
User Management
useradd //添加用户
adduser //添加用户
passwd //为用户设置密码
usermod //修改用户信息
pwcov //同步用户从/etc/passwd到/etc/shadow
pwuncov //pwcov逆操作
User Group Management
groupadd //添加用户组
groupdel //删除用户组
groupmod //修改用户组信息
groups //显示用户所属用户组
grpcov //同步用户组从/etc/group到/etc/gshadow
Rights Management
$ sudo chmod 755 [folder] Read permission for 4 Write permission for 2 run permission for 1 755 in the first 7 for file owner permissions 7=4+2+1 (RWX) The second 5 is the permissions of the same group of users 5=4+1 (R-x) The third 5 is the permissions of other users 5=4+1 (r-x)
chmod //更改文件权限信息
chown //更改文件拥有者
chgrp //更改文件所属用户组
Note--linux command