最近在EC2主机中启用了一个ubuntu20.4容器。试着把启动一个DOCKER服务的过程记录一下。
使用下载的pem登陆
在linux系统,
chmod 400 pemfile
ssh -i penfile ubuntu@IP
在win10
需要更改pem权限,
将下面的代码存为bat,将pem拖动到上面。
:: # Set Variable ::
Set Key=%1
:: # Remove Inheritance ::
Cmd /c Icacls %Key% /c /t /Inheritance:d
:: # Set Ownership to Owner ::
Cmd /c Icacls %Key% /c /t /Grant %UserName%:F
:: # Remove All Users, except for Owner ::
Cmd /c Icacls %Key% /c /t /Remove Administrator "Authenticated Users" BUILTIN\Administrators BUILTIN Everyone System Users
:: # Verify ::
Cmd /c Icacls %Key%
但是还是需要打开一下权限
图片方式的英文说明
ubuntu初始root密码
安装完Ubuntu后忽然意识到没有设置root密码,不知道密码自然就无法进入根用户下。
到网上搜了一下,原来是这么回事:
Ubuntu的默认root密码是随机的,即每次开机都有一个新的root密码。
解决方法:
我们可以在终端输入命令“sudo passwd”,然后输入当前用户的密码后"Enter"。
终端会提示我们输入新的密码并确认,此时的密码就是root新密码。
修改成功后,输入命令 su root,再输入新的密码就ok了。
具体操作如下:
user@instant-contiki:~$ sudo passwd
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
user@instant-contiki:~$
user@instant-contiki:~$ su -
Password:
root@instant-contiki:~#
若输入exit命令,则从root退回到普通用户
原文链接:https://blog.csdn.net/frank_jb/article/details/50927088
安装DOCKER
https://gist.github.com/wdullaer/f1af16bd7e970389bad3
wget -O - https://gist.githubusercontent.com/wdullaer/f1af16bd7e970389bad3/raw/install.sh | bash or
wget -O - https://bit.ly/docker-install | bash (if you trust wdullaer and me 😛)