Ubuntu Sway开发机安装手册
# Ubuntu Sway开发机安装手册
# ① 官方地址
Ubuntu Sway (opens new window)
# ② 安装
![https://oss.megabit.co.nz/jifu/uploads/202501051458281.webp]
# 初始化
# 修改root密码
sudo passwd
1
# 更新
sudo apt update -y
sudo apt upgrade -y
1
2
2
# 安装包
net-tools
: 网络工具openssh-server
: SSHfish
: fish(fish shell)duf
: 磁盘使用情况neofetch
: 系统信息iotop
: 系统资源mbw
: 内存测试ncdu
: 磁盘管理- 'axel': 下载
sudo apt install -y git
sudo apt install -y curl wget
sudo apt install -y net-tools openssh-server
sudo apt install -y fish
sudo apt install -y duf neofetch iotop mbw ncdu axel
1
2
3
4
5
6
2
3
4
5
6
# 安装软件
# Chrome
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install -y ./google-chrome-stable_current_amd64.deb
1
2
2
# vscode
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
sudo apt update
sudo apt install -y code
1
2
3
4
5
2
3
4
5
# vlc
sudo apt install -y vlc
1
# ③ 配置
# sshd
sshd是ssh的服务器端,它的配置文件在
/etc/ssh/sshd_config
# 编辑
vim /etc/ssh/sshd_config
1
# 配置
PermitRootLogin
: 允许root登录PasswordAuthentication
: 允许密码登录
PermitRootLogin yes
PasswordAuthentication yes
1
2
2
# 重启
systemctl restart sshd
1
# fish
fish是一个交互式shell,它的配置文件在
~/.config/fish/config.fish
# 修改默认shell
chsh -s /usr/bin/fish
1
# 安装oh my fish
curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install | fish
1
# 安装主题
omf install bira
1
# autojump
autojump是一个跳转命令,它的配置文件在
~/.config/fish/config.fish
# 添加autojump到fish配置文件
vim ~/.config//fish/config.fish
1
添加配置
begin
set --local AUTOJUMP_PATH /usr/share/autojump/autojump.fish
if test -e $AUTOJUMP_PATH
source $AUTOJUMP_PATH
end
end
1
2
3
4
5
6
2
3
4
5
6
# 替换CAPS键位为CTRL
# 使用Linux配置修改
vim /etc/default/keyboard
1
替换配置
XKBOPTIONS="ctrl:nocaps"
1
配置重载
sudo dpkg-reconfigure keyboard-configuration
sudo systemctl restart keyboard-setup
1
2
2
# 使用Sway配置修改 👍🏻
- 编辑 Sway 配置文件
vim ~/.config/sway/config
1
- 添加以下行
input * xkb_options ctrl:nocaps
1
- 重新加载 Sway
swaymsg reload
1
上次更新: 2025/01/05, 15:32:39