您现在的位置是:首页 > 文章详情

常用命令集合

日期:2018-07-05点击:345
# dd if=/dev/zero of=/dev/null zero源源不断的产生数据到黑洞null # dd if=/dev/zero of=/data/a.tgz bs=1M count=100 zero产生100M的数据到/data/a.tgz Shift trl T  打开新的终端页面 # echo 123 | passwd --stdin root 开机默认修改root密码 # cat /etc/services | less 查看端口号 # convmv -f GB2312 -t utf8 -r --notest 目录 乱码转换工具convmv # cp /etc/vsftpd/vsftpd.conf{,.bak} 快速备份 # cp /etc/vsftpd/vsftpd.conf{.bak,} 备份覆盖 # yum search elinks // # yum provides "*/elinks" 查询软件包名 # ps aux | grep httpd 查看进程 最小安装rhel图形界面: # yum -y groupinstall "Desktop" "Fort" "General Purpose Desktop" "Input Methods" "X Window System" "Desktop Platform" "Chinese Support"  # vim /etc/services 查看默认协议端口 # vim /etc/sysconfig/i18n 修改系统语言 # uuidgen 自动生成UUID # > /etc/udev/rules.d/70-persistent-net.rules #reboot 清空网卡命名规则 # du -sh /opt 查看文件大小 # cat /proc/cpuinfo # top # uptime 查看CPU信息,平均负载 [ -f /var/run/httpd/httpd.pid ] echo $? 判断http服务是否在运行 # /usr/share/doc/* 软件的使用说明目录 # vim /etc/ld.so.conf # ldconfig 系统读取的库文件目录设置 # ab -c 100 -n 1000 http://1.1.1.1/ 模拟100个人访问服务器1000次 # vim /etc/security/limits.conf # ulimit -a 系统内核的一些限制数目, 修改完后需重启reboot # data -d ‘@1421242424’ 时间戳转换 # yum -y groupinstall "X Window System" "Desktop" 安装桌面环境 # cat /etc/redhat-release uname -a 查看系统版本 # yum -y install bash-completion 参数补全 # egrep -v“^$|^#” /etc/login.defs |wc -l 去除#和空行的配置文件 # awk '/[a-z]|^\[/{print}' chrony.conf # awk '!/^#|^$/{i++}END{print i}' chrony.conf  # awk '!/#|^$/{print}' conf/nginx.conf # vim /etc/resolv.conf nameserver 114.114.114.114  # for i in * ; do docker load <${i} ; done # for i in `docker images | grep -v REPOSITORY | awk '{print $1}' ` ;do docker push $i;done # doceker rm $(docker ps -aq) # cat >centos.repo <<EOF [CENTOS] Name=centos EOF http://IP:5000/v2/_catalog cp ifcfg-{eth0,br-ex} # curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo # yum -y install epel-release (rpm -ivh http://mirrors.aliyun.com/epel/epel-release-latest-7.noarch.rpm) 阿里云epel源 # yum install -y centos-release-openstack-newton 安装Openstack仓库 # nohup ..... & 放在后台运行 # cat -n /etc/passwd | head -15 | tail -5 打印第11行到15行 # ip add | tee a.txt | grep "inet " 输出到a.txt并打印inet # openssl rand -hex 10 生成随机数
原文链接:https://yq.aliyun.com/articles/681233
关注公众号

低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。

持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。

转载内容版权归作者及来源网站所有,本站原创内容转载请注明来源。

文章评论

共有0条评论来说两句吧...

文章二维码

扫描即可查看该文章

点击排行

推荐阅读

最新文章