sh + 文件名 执行sh文件命令
vi +文件名 编辑 查看文件
退出:q! 保存退出 :wq
复制一行多行 yy n 黏贴 p
dd快速删除一行
shift+G快速到文件末尾
0行首
$行尾
n+ n行行首
n- n行行尾
撤销u 恢复撤销 ctrl+r
ps -ef|grep java 查看有关java的进程找pid
kill -9 pid 关闭进程
修改profile文件的话要 source profile 使文件生效
sudo service sshd status 开启SSH命令
/etc/profile文件配置环境变量
方法1:
让/etc/profile文件修改后立即生效 ,可以使用如下命令:
. /etc/profile
注意: . 和 /etc/profile 有空格
方法2:
让/etc/profile文件修改后立即生效 ,可以使用如下命令:
source /etc/profile