JiFu's Wiki JiFu's Wiki
首页
  • HTML
  • JavaScript
  • NodeJS
  • Vuejs
  • 微信小程序
  • Python
  • 数据库
  • 中间件
  • 算法
  • 软件工程
  • Wordpress
  • iOS开发
  • Android开发
  • Linux
  • Windows
  • MacOS
  • Docker
  • Vim
  • VSCode
  • Office
  • 其他
  • Photoshop
  • Sketch
  • Mac
  • 游戏
关于
  • 分类
  • 标签
  • 归档
GitHub (opens new window)
首页
  • HTML
  • JavaScript
  • NodeJS
  • Vuejs
  • 微信小程序
  • Python
  • 数据库
  • 中间件
  • 算法
  • 软件工程
  • Wordpress
  • iOS开发
  • Android开发
  • Linux
  • Windows
  • MacOS
  • Docker
  • Vim
  • VSCode
  • Office
  • 其他
  • Photoshop
  • Sketch
  • Mac
  • 游戏
关于
  • 分类
  • 标签
  • 归档
GitHub (opens new window)
  • DevOps介绍
  • Linux

    • Linux介绍
    • Linux系统目录结构及详细说明
    • 使用SSH登录Google Cloud Platform
    • 生产服务器虚拟化环境搭建大纲
    • 服务器虚拟化环境搭建
    • Ubuntu

      • Ubuntu介绍
      • Ubuntu服务器安装手册
      • Ubuntu开发机安装手册
      • Ubuntu i3wm桌面环境安装
      • Ubuntu安装Samba服务
      • 6.Ubuntu服务器安装桌面环境
      • Ubuntu Sway开发机安装手册
      • Debian服务器安装手册
      • Debian Sway开发机安装手册
        • 进去TTY
        • 启动sway
        • Chrome
        • vscode
        • vlc
        • dropbox
        • sshd
        • fish
        • autojump
        • 替换CAPS键位为CTRL
        • git配置
    • CentOS

    • Manjaro

    • Command

    • System Service

  • MacOS

  • Windows

  • Docker

  • Vim

  • VSCode

  • Office

  • 其他

  • 运维
  • Linux
  • Ubuntu
JiFu
2025-03-26
目录

Debian Sway开发机安装手册

👺 主题参考 (opens new window)

# 最小化安装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

# 安装基础包

  1. kitty 终端
  2. wofi 启动器
  3. mako 通知
  4. zathura 阅读器
  5. thunar 文件管理
  6. gdebi 安装软件(包管理器) - 自动解决依赖
  7. pamixer 音量调节
  8. light 亮度调节
  9. 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

# 启动sway

# 进去TTY

ctrl + alt + f2
1

# 启动sway

sway
1

# 配置Sway

mkdir -p ~/.config/sway
cp /etc/sway/config ~/.config/sway/config
1
2

# 安装 SDDM 登陆界面

sudo apt install -y sddm
sudo systemctl enable sddm
sudo systemctl disable lightdm
1
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

# 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

# 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

# ③ 配置

# sshd

sshd是ssh的服务器端,它的配置文件在/etc/ssh/sshd_config

# 编辑

vim /etc/ssh/sshd_config
1

# 配置

  • PermitRootLogin: 允许root登录
  • PasswordAuthentication: 允许密码登录
PermitRootLogin yes
PasswordAuthentication yes
1
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

# 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

# 替换CAPS键位为CTRL

# 使用Linux配置修改

vim /etc/default/keyboard
1

替换配置

XKBOPTIONS="ctrl:nocaps"
1

配置重载

sudo dpkg-reconfigure keyboard-configuration
sudo systemctl restart keyboard-setup
1
2

# 使用Sway配置修改 👍🏻

  1. 编辑 Sway 配置文件
vim ~/.config/sway/config
1
  1. 添加以下行
input * xkb_options ctrl:nocaps
1
  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

# 设置git全局用户名和邮箱

git config --global user.name "abc"
git config --global user.email "abc@gmail.com"
1
2
上次更新: 2025/05/07, 01:42:13
Debian服务器安装手册
Centos介绍

← Debian服务器安装手册 Centos介绍→

最近更新
01
WPS快捷键
05-21
02
Disable notification "to get future google chrome updates you'll need macos 10.13 or later" on mac
05-14
03
MacOS软件推荐
04-30
更多文章>
Theme by Vdoing | Copyright © 2019-2025 Ji Fu | MIT License
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式