Ubuntu新机dotfile

ubuntu-install


使用 ssh连接服务器

1
2
3
4
## 连接服务器
$ ssh -o ServerAliveInterval=180 -o ServerAliveCountMax=3 -o KeepAlive=yes [user]@[ip]
## 如果你是重装服务器可能还需要重置下ssh
$ ssh-keygen -R [ip]

注册ssh到authorized_keys

  • 本机操作
1
$ cat ~/.ssh/id_rsa.pub
  • 服务器操作
1
$ echo '<id_rsa.pub>' >> ~/.ssh/authorized_keys

注意,此时的ssh信息是在 ubuntu 用户下完成,如果需要 root 权限,需要切换到 root 执行


切换到管理员角色

1
2
3
4
## 切换到root下
$ sudo su
## `~` => `/root`
$ cd ~

Clone project

1
$ git clone https://github.com/uyaki/dotfiles.git ~/dotfiles

文件默认操作路径 /root/dotfiles

1
2
3
$ cd dotfiles
$ sudo chmod 777 ./linux/*-install.sh
$ ./linux/ubuntu-install.sh

其实不建议执行脚本,因为执行过程过长,不利于问题及时解决。

建议手动安需复制执行语句执行


在本地安装字体(非必须)

使用zsh主题powerlevel10k,需要在客户端下载字体 hack-nerd-font

具体查看:字体字体安装教程

如需修改 powerlevel10k 配置,执行:

1
$ p10k configure

安装clash(非必须)

具体查看:clash in docker


安装 ranger

具体查看:ranger

uyaki 支付宝支付宝
uyaki 微信微信
0%