Open xvno opened 4 years ago
# install
sudo apt install openssh-server -y
# enables the service
sudo systemctl enable ssh
# start service
sudo systemctl start ssh
# configure ufw
sudo ufw allow ssh
Create bootable ubuntu usb drive mac os
hdiutil convert -format UDRW -o ready2dd ubuntu-20.20-amd64.iso
diskutil unmountDisk /dev/diskN
, 并用 sudo dd if=ready2dd.dmg of=/dev/diskN bs=1m
diskutil eject /dev/diskN
两种方式:
cat ~/.ssh/id_ras.pub | ssh x@10.10.1.99 'cat >> /home/wei/.ssh/authorized_keys'
# authorized_keys在ubuntu上是个文件, 而非文件夹
ssh-copy-id -i ~/.ssh/id_ras.pub x@10.10.1.99
ssh nuc
Host nuc
User x
HostName 10.10.1.99
IdentityFile ~/.ssh/id_rsa
# 当 github 有俩账号时, 配置如下
# 另外, 还需更改 repo 的地址, 替换 github.com 为对应的 volving.github.com 或 xvno.github.com
Host xvno.github.com
HostName github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/x_github_rsa
Host volving.github.com
HostName github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/v_github_rsa
# git remote -v
# origin git@xvno.github.com:xvno/blog.git (fetch)
# origin git@xvno.github.com:xvno/blog.git (push)
# volving git@volving.github.com:volving/blog.git (fetch)
# volving git@volving.github.com:volving/blog.git (push)
# git push origin dev
# git push solving dev
获取安装包安装: wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get purge docker-ce docker-ce-cli containerd.io
sudo rm -rf /var/lib/docker
curl -fsSL https://get.docker.com -o get-docker.sh
# sudo chmod 777 get-docker.sh
sudo sh get-docker.sh
sudo apt update
apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Verify that you now have the key with the fingerprint 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88, by searching for the last 8 characters of the fingerprint.
$ sudo apt-key fingerprint 0EBFCD88
pub rsa4096 2017-02-22 [SCEA]
9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
uid [ unknown] Docker Release (CE deb) <docker@docker.com>
sub rsa4096 2017-02-22 [S]
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo install docker-ce docker-ce-cli containerd.io
sudo docker ---
sudo usermod -aG docker $USER
docker login
工具 & 命令
工具
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
zsh
Mdf: /etc/zsh/*, Add
OPATH
Mdf: ~/.zshrc,PATH=$OPATH:...
xclip
apt;
xclip file_name
xclip -sel clip file_name
# -sel clip 系统剪贴板tail -n 20 error.log | xclip -sel clip
命令