[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 如果提示 ...
随机推荐
- Problem : 这个题如果不是签到题 Asm.Def就女装(积性函数dp
https://oj.neu.edu.cn/problem/1460 思路:若n=(p1^a1)*(p2^a2)...(pn^an),则f(n,0)=a1*a2*...*an,显然f(n,0)是积性函 ...
- Codeforces 1058 D. Vasya and Triangle 分解因子
传送门:http://codeforces.com/contest/1058/problem/D 题意: 在一个n*m的格点中,问能否找到三个点,使得这三个点围成的三角形面积是矩形的1/k. 思路: ...
- cogs 1199选课(树形dp 背包或多叉转二叉
http://cogs.pro:8080/cogs/problem/problem.php?pid=vQyiJkkPP 题意:给m门课,每门课在上完其先修课后才能上,要你从中选n门课使得总学分尽可能大 ...
- CodeForces 149E Martian Strings exkmp
Martian Strings 题解: 对于询问串, 我们可以从前往后先跑一遍exkmp. 然后在倒过来,从后往前跑一遍exkmp. 我们就可以记录下 对于每个正向匹配来说,最左边的点在哪里. 对于每 ...
- 虚拟化(三) -vsphere套件的安装注意及使用
https://www.cnblogs.com/zhrngM/p/9547958.html [转]虚拟化(三):vsphere套件的安装注意及使用 vsphere套件里面主要的组件有esxi.vcen ...
- ORACLE SQL语句练习题
--1:选择部门30中的所有员工select * from emp where deptno=30--2:列出所有办事员(clerk) 的姓名.编号和部门编号select empno,ename,de ...
- Winform中在FastReport的PreviewControl预览控件中对report控件模板中控件值进行修改
场景 FastReport安装包下载.安装.去除使用限制以及工具箱中添加控件: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/10 ...
- NOIP2009 1.多项式输出
题目: 其中,aixi称为 i 次项,ai 称为 i 次项的系数.给出一个一元多项式各项的次数和系数,请按照如下规定的格式要求输出该多项式: 1. 多项式中自变量为 x,从左到右按照次数递减顺序给出多 ...
- switch对输入的运算符的判断
import java.util.*; public class App3 { public static void main(String [] args) { int num1,num2,num; ...
- /bin/java: 没有那个文件或目录spark/bin/spark-class:行71: /usr/java/jdk1.8
1.检查java环境有没有问题 2.1没问题后检查文件的编码是否有问题