Linux技巧

Posted by Chris on July 8, 2016

1.快捷键

ctrl+alt+t   //终端

2.Google Cloud开启ssh远程登录

2.1.修改配置

sudo -i 
vi /etc/ssh/sshd_config
# Authentication:
PermitRootLogin yes //默认为no,需要开启root用户访问改为yes

# Change to no to disable tunnelled clear text passwords
PasswordAuthentication yes //默认为no,改为yes开启密码登陆

2.2.更新root用户密码

passwd root
reboot

3.常用命令

apt-get update //更新源
apt-get upgrade  //更新所有软件
apt-get autoremove <package>  //删除没用的依赖包
apt-get --purge remove <package>    //删除软件及其配置文件
apt-get clean 

4.环境变量

当前用户

vim ~/.bashrc

export PATH=~/Android/Sdk/platform-tools:$PATH
export PATH=~/Android/Sdk/tools:$PATH

source ~/.bashrc