[Note] CentOS 命令
1. uninstall software
- install by yum install
yum install -y [package-name] //无-y则交互式安装
yum remove [package-name]
- install by
./configure
make
make install
to uninstall this type
make uninstall
2. 同步系统时间
查看系统时间
date
date -s 12:00:00 #设置当前时间
date -s "2018-6-1 18:00:00" #设置日期
同步系统时间
yum install -y ntpdate
ntpdate time.windows.com
ntp常用服务器:
中国国家授时中心:210.72.145.44
NTP服务器(上海) :ntp.api.bz
美国:time.nist.gov
复旦:ntp.fudan.edu.cn
微软公司授时主机(美国) :time.windows.com
台警大授时中心(台湾):asia.pool.ntp.org
3. Miscellaneous
- 文件上传下载
yum install lrzsz
sz 下载文件
rz 上传文件
- 查看ip
ip addr
- 设置ip
1.ifconfig 查看网卡
ifconfig eth0 192.168.1.21 netmask 255.255.255.0 # 即时生效
2.通过修改网卡配置文件修改ip
vi /etc/sysconfig/network-scripts/ifcfg-eth0
BOOTPROTO=static
ONBOOT="yes" #开机启用本配置
IPADDR=192.168.7.106 #静态IP
GATEWAY=192.168.7.1 #默认网关
NETMASK=255.255.255.0 #子网掩码
DNS1=192.168.7.1 #DNS 配置
重启网络服务
service network restart
- ssh 关闭后程序继续运行
安装screen
yum install screen
创建子界面
screen -S test
或
screen
查看子界面状态
screen -ls
[root@localhost project_baidu_tieba]# screen -ls
There is a screen on:
82041.tieba (Detached)
1 Socket in /var/run/screen/S-root.
切换到子界面
screen -r 82041 # 82041是pid
或
screen -r tieba
如果出现了 (Attached)无法切换
[root@localhost ~]# screen -r 63313
There is a screen on:
63313.tieba (Attached)
There is no screen to be resumed matching 63313.
screen -D -r 63313
在子界面中 Ctrl A D 暂时离开子界面
子界面中其中的进程继续执行
关闭子界面
- 子界面输入exit退出
Ctrl A K退出当前子界面 选择y- 父界面 kill -9 杀死进程
[Note] CentOS 命令的更多相关文章
- CentOS命令登录MySQL时,报错ERROR 1045 (28000):
CentOS命令登录MySQL时,报错ERROR 1045 (28000): Access denied for user root@localhost (using password: NO)错误解 ...
- 一些常用的centos命令,记忆下,属于常用的
一些常用的centos命令,记忆下,属于常用的 查询内网IP hostname -I 查询外网IP curl ifconfig.me 查看硬盘使用情况 df -h 查看系统资源使用率 top 查看系统 ...
- 重装了服务器,用的是centos/php微信小程序版,centos 命令大全
centos 命令大全 1.关机 (系统的关机.重启以及登出 ) 的命令 shutdown -h now 关闭系统(1) init 0 关闭系统(2) telinit 0 关闭系统(3) shutdo ...
- centos 命令集合
链接: http://www.cnblogs.com/zitsing/archive/2012/05/02/2479009.html http://www.centoscn.com/CentOS/he ...
- centos 命令大全
文件操作: ls ####查看目录中的文件#### ls -F ####查看目录中的文件#### ls -l ####显示文件和目录的详细资料#### ls -a ...
- 一些常用到的Centos命令
CentOS常用命令在我们的使用中,经常被使用.所以,我们对一些经常使用又很重要的CentOS常用命令进行了全面的整理.下面,就来介绍这些CentOS常用命令. 一:使用CentOS常用命令查看cpu ...
- centos命令自动补全增强
CentOS默认没有像Ubuntu系统一样命令参数补全功能,例如yum install无法补全.通过安装bash-completion安装命令参数补全增强. CentOS6 默认情况下,CentOS6 ...
- CentOS命令修改系统时间同步
使用Centos,遇到本地时间对不上,直接敲命令:date -s "2016-01-08 15:15:15"是立即生效了,但是重启后,系统时间还是原来的. 修改了其一是没有办法奏 ...
- centos命令安装
1.解决ifconfig命令失效:需要安装net-tools工具 yum install net-tools 2.免密码登录 (1)通过命令,产生公钥信息 ssh-keygen -t rsa 如果提示 ...
随机推荐
- ACM-ICPC 2018 徐州赛区(网络赛)
目录 A. Hard to prepare B.BE, GE or NE F.Features Track G.Trace H.Ryuji doesn't want to study I.Charac ...
- Orders POJ - 1731
The stores manager has sorted all kinds of goods in an alphabetical order of their labels. All the k ...
- Python 单元测试框架系列:聊聊 Python 的单元测试框架(一):unittest
作者:HelloGitHub-Prodesire HelloGitHub 的<讲解开源项目>系列,项目地址:https://github.com/HelloGitHub-Team/Arti ...
- Springboot源码分析之代理对象内嵌调用
摘要: 关于这个话题可能最多的是@Async和@Transactional一起混用,我先解释一下什么是代理对象内嵌调用,指的是一个代理方法调用了同类的另一个代理方法.首先在这儿我要声明事务直接的嵌套调 ...
- Maven生成项目站点
概述 Maven不仅仅是一个自动化构建工具和一个依赖工具,还能够帮助聚合项目信息.POM可以包含各种项目信息.如项目描述.版本控制系统地址.缺陷跟踪系统地址.许可证信息.开发者信息等. 另Maven社 ...
- Could not delete D:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/platform/WEB-INF/lib
再把之前的maven工程删掉时,出现了如下错误: Could not delete D:/workspace/.metadata/.plugins/org.eclipse.wst.server.cor ...
- Redis常用命令(Set、Hash、Zset)
1.Set(单值多value) 1. sadd.smembers key . > SADD set01 (integer) > SMEMBERS set01 ) " ) &quo ...
- 【学习笔记】第五章 python3核心技术与实践--字典和集合
[第四章]思考题的答案,仅供参考: []比list()更快,因为调用了list函数有一定的时间,而[]却没有. 前面我们学习了 Python 中的列表和元组,了解了他们的基本操作和性能比较.这节章,我 ...
- valueForKey与valueForKeyPath 区别
1.删除数组中重复的数据 2.valueForKeyPath:可以深层次取到子属性,不管隐藏的多深 valueForKey:无法取到深层次子属性 但是也有其相似的地方: 比如:快速找到字典数组中ke ...
- LOVE POWER html与javaScript
1.纯HTML与javaScript编写的表白动态图 1.对于世界而言,你是一个人:但是对于某个人,你是他的整个世界. 2.不要为那些不愿在你身上花费时间的人而浪费你的时间. 3.我爱你,不是因为你是 ...