Debian Sway开发机安装手册
# 最小化安装debian(不安装任何桌面环境)
# 用户登录
su - 进入root
# 安装sudo
apt install -y sudo
1
# 用户添加为sudo用户组
/usr/sbin/usermod -aG sudo jifu
1
g
# 切换到jifu用户
su jifu
1
# 安装 sway 环境
sudo apt install -y sway sway-backgrounds swaylock swayidle waybar foot seatd xwayland
1
# 安装sway
sudo apt update && sudo apt upgrade -y
sudo apt install sway -y
sudo apt install swaylock swayidle xwayland grim slurp wl-clipboard pulseaudio-utils alsa-utils -y
1
2
3
2
3
# 安装基础包
- kitty 终端
- wofi 启动器
- mako 通知
- zathura 阅读器
- thunar 文件管理
- gdebi 安装软件(包管理器) - 自动解决依赖
- pamixer 音量调节
- light 亮度调节
- brightnessctl 亮度调节
sudo apt install -y kitty
sudo apt install -y wofi
sudo apt install -y mako-notifier
sudo apt install -y zathura zathura-pdf-poppler
sudo apt install -y thunar
sudo apt install -y gdebi
sudo apt install -y pamixer
sudo apt install -y light
sudo apt install -y brightnessctl
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
# 启动sway
# 进去TTY
ctrl + alt + f2
1
# 启动sway
sway
1
# 配置Sway
mkdir -p ~/.config/sway
cp /etc/sway/config ~/.config/sway/config
1
2
2
# 安装 SDDM 登陆界面
sudo apt install -y sddm
sudo systemctl enable sddm
sudo systemctl disable lightdm
1
2
3
2
3
# swaybar 安装字体
sudo apt install -y fonts-firacode fonts-font-awesome fonts-noto-color-emoji
1
# 重启sway
swaymsg reload
1
# 安装软件
# 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
# 下载并添加 Microsoft GPG 公钥
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /etc/apt/keyrings/microsoft.gpg > /dev/null
# 添加 VS Code 软件源
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/vscode stable main" | \
sudo tee /etc/apt/sources.list.d/vscode.list > /dev/null
# 更新软件源并安装
sudo apt update
sudo apt install -y code
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
# vlc
sudo apt install -y vlc
1
# dropbox
wget https://www.dropbox.com/download?dl=packages/ubuntu/dropbox_2020.03.04_amd64.deb -O ./dropbox_2020.03.04_amd64.deb
sudo apt install -y ./dropbox_2020.03.04_amd64.deb
1
2
3
2
3
# ③ 配置
# 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
# 安装主题
# bria
# krisleech
omf install bira
omf install krisleech
1
2
2
# 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
# git配置
# 修改 默认 nono -> vim
sudo update-alternatives --config editor
1
- 方法2
# 设置默认编辑器为vim
git config --global core.editor "vim"
# 查看默认编辑器
git config --global core.editor
1
2
3
4
2
3
4
# 设置git全局用户名和邮箱
git config --global user.name "abc"
git config --global user.email "abc@gmail.com"
1
2
2
上次更新: 2025/05/07, 01:42:13