查看IP:ifconfig
切换目录:cd /xx/xx/xx
更改文件:vim /xx/xx/xx
1,点击 insert 进行切换模式修改文件
2,点击esc 然后输入:wq 保存退出
切换root: sudo su
切换其他用户: su username[用户名]
检查ssh是否安装:sudo ps -e |grep ssh
安装ssh:apt-get install openssh-server
启动ssh:/etc/init.d/ssh start
修改root密码:sudo passwd
修改其他密码: passwd username[用户名]
安装cat 命令:sudo apt-get update
sudo apt-get install coreutils配置加速地址:
1,vim /etc/docker/daemon.json
2,
{
"registry-mirrors": ["https://docker.1panel.live"]
}安装docker:注意安装需要root权限和重新登录才能使更改生效。
1,添加Docker官方的GPG密钥
curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
2,添加Docker的软件源
sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
3,安装Docker:
apt-get install docker-ce docker-ce-cli containerd.io
4,配置用户组
sudo usermod -aG docker $USER
5,运行docker
systemctl start docker
6,安装工具
apt-get -y install apt-transport-https ca-certificates curl software-properties-common
7,重启docker
service docker restart
8,验证是否成功
sudo docker run hello-world
9,查看版本
sudo docker version
10,查看镜像
sudo docker images