环境变量
export 导出系统环境变量
环境变量调用要加$
echo $HOSTNAME (查看主机名)
pwd 查看当前目录
临时:
export lin="/etc/tmp" #定义lin为/etc/tmp
cd $lin
永久:
/etc/bashrc
export aa="/etc/mnt"
刷新:(source)
source /etc/bashrc
用户下使用profile写入 用户专属变量 ls -a 进入用户目录
cp -i 可复制并改名
 
history清理
别名(alias)
alias qq="clear"
alias rr="操作参数" #别名rr加操作参数
unalias qq  #取消别名
永久生效全局 :
 vim /etc/bashrc
局部到用户目录下的profile写入或.bashrc
 
设置后都必须刷新source!!!
source /etc/bashrc
 
scp(远程拷贝)
scp linhut@192.168.0.9:/tmp/teamviewer_10.0.37742.1686.rpm /tmp
 
ssh(远程连接)
[root@desktop38 ~]# ssh root@192.168.0.11
The authenticity of host '192.168.0.11 (192.168.0.11)' can't be established.
ECDSA key fingerprint is 20:3f:01:4c:35:52:e6:51:fa:b2:48:37:e8:21:e1:07.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.0.11' (ECDSA) to the list of known hosts.
root@192.168.0.11's password:
Last login: Mon Jul 17 11:37:15 2017 from desktop22.example.com
秘钥存放文件:/root/.shh/known_hosts
 
生成公钥:
ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
ssh-copy-id -i IP    #把公钥给别人
     接受秘钥地址:
/root/.ssh
traceroute     ip地址          查看路由跳数
 
 
netstat -tpln     
t:tcp
p:进程
l : 侦听
n: name
  -r  查看网关
 
screen     #同步共享屏幕
yum install screen -y
screen -s  youname     #申请查看  
 
视频链接: 链接: http://pan.baidu.com/s/1c2D2CaG 密码: pwbq