RHEL常用命令


RHEL常用命令
 
1、关机 
shutdown -h now 
halt 
power off 
init 0 
  www.2cto.com  
2、重启 
reboot 
 
3、查看当前目录 
pwd 
 
4、添加系统用户 
useradd newuser 
 
5、更改用户密码 
passwd newuser 
然后输入密码,输入确认密码。 
 
6、ssh连接 
ssh root@192.168.0.204 
 
7、scp命令 
scp root@192.168.0.204:/root/tmp/*.zip ./ 
 
8、rsync命令 
rsync -vaz root@192.168.0.204:/root/tmp/*.zip ./ 
 
和scp命令类似,据说速度要快过scp,可能是压缩之后再传输,传输完成之后解压缩。 
 
9、linux下启动oracle 
sqlplus / as sysdba 
startup 
lsnrctl start 
emctl start dbconsole 
  www.2cto.com  
10、linux下关闭oracle 
 
sqlplus / as sysdba 
shutdown abort或者shutdown immediate 
lsnrctl stop 
emctl stop dbconsole 
 
11、统计目录下文件大小 
du -h --max-depth=1 | sort -n 
 
12、安装rpm包 
rpm -ivh *.rpm 
 
13、查看cpu信息 
cat /proc/cpuinfo 
 
14、查看文件后十行 
tail *.txt 
 
15、查看文件前五行 
head *.txt 
 
16、启动图形化界面 
startx   www.2cto.com  
 
17、查看历史命令 
history 
 
18、更改预定义的域名和ip 
vi /etc/hosts 
 
19、更改主机名 
第一步: 
#hostname oratest 
第二步: 
修改/etc/sysconfig/network中的hostname 
第三步: 
修改/etc/hosts文件
 
 
作者 cutesunshineriver

相关内容

    暂无相关文章