Coggle requires JavaScript to display documents.
Linux
http_proxy=http://localhost:8123 xxxx
alias hp="http_proxy=http://localhost:8123"
hp xxx
/etc/profile
curl ip.gs
:52,55s/^/#/g
&&
$?
action "输出内容" /bin/true或者/bin/false
# 1 echo "content" | mail -s "title" xxx@qq.com # 2 mail -s "title" xx@qq.com < /home/orris/hello
/var/log/messages
export PROMPT_COMMAND='{ msg=$(history 1 | { read x y; echo $y; }); logger "[euid=$(whoami)]":$(who am i):[`pwd`]"$msg"; }'
uname -s # 查看内核名字 uname -r # 查看内核 uname -m # 查看32位还是64位 uname -a # 所有
chkconfig --level 3 sshd on chkconfig --list
useradd violet
passwd violet
su - violet
sudo su - root
whoami
vi /etc/sudoers
sudo -l
Defaults secure_path = /application/mysql/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
yum search nmap
yum install nmap -y
rpm -qa nmap lsof # 使用grep会稍微慢点 rpm -qa | egrep 'rsyslog|sudo' #检查是否安装了sudo和rsyslog
-a
-i
-v
-q
-e
rpm -qa httpd rpm -e httpd-2.2.15-31.e16.centos.x86_64 rpm -e --nodeps httpd-2.2.15-31.e16.centos.x86_64 # nodeps可以不加,表示只卸载这个包,而不考虑依赖
source.list
sudo apt-get update
make && make install
echo $?
cat /etc/redhat-release uname -r uname -m
time.windows.com
/usr/sbin/ntpdate time.nist.gov
/sbin/init [0123456Ss] # 后面跟对应模式的id就行了 init 0 # 关机 init 6 # 重启
/sbin/runlevel
0 系统停机状态 1 单用户或系统维护状态 2 无NFS的多用户模式 3 多用户模式 4 unused 5 图形模式 6 重新启动 S
chkconfig httpd on
sudo chmod 744 /etc/rc.d/rc.local # 在/etc/rc.local里添加我们要在开机时执行的命令就可以了 /usr/bin/mount -t nfs 172.16.55.137:/data /mnt # 比如说,客户端进行nfs挂载
# systemctl disable httpd systemctl enable httpd #开机自启动
sudo systemctl start httpd.service sudo systemctl status httpd.service sudo systemctl stop httpd.service sudo systemctl restart httpd.service sudo systemctl reload httpd.service
sudo systemctl enable httpd.service
systemctl list-unit-files --type=service
sudo lsof -i :22
netstat -lntup | grep 22
RedHat:CentOS,Fedora Debian:Ubuntu
> /etc/issue # or cat /dev/null > /etc/issue
cat /etc/issue
hostnamectl set-hostname <new_hostname>