歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux技術 >> linux 常用腳本、命令

linux 常用腳本、命令

日期:2017/3/1 18:09:33   编辑:Linux技術
1、簡單去掉注釋的行
cat httpd.conf|grep -v ^\ *# >mayuehehe
2、修改ssh的端口
/usr/sbin/sshd -p 1433
3、查看某用戶
id username
4、查看環境變量
set 或 env
5、換 yum源
cd /etc/yum.repos.d
mv CentOS-Base.repo CentOS-Base.repo.save
wget http://centos.ustc.edu.cn/CentOS-Base.repo
6、打開指定端口
iptables -A INPUT -p udp --dport 58 -j ACCEPT
7、測試硬盤速度
hdparm -Tt /dev/sda
8、時間同步
ntpdate -s time.nist.gov
hwclock --systohc
Copyright © Linux教程網 All Rights Reserved