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开发机安装手册
        • 添加backports源
        • 初始化
        • 更新
        • 安装包
        • 安装软件
        • sshd
        • fish
        • autojump
        • 替换CAPS键位为CTRL
      • Debian服务器安装手册
      • Debian Sway开发机安装手册
    • CentOS

    • Manjaro

    • Command

    • System Service

  • MacOS

  • Windows

  • Docker

  • Vim

  • VSCode

  • Office

  • 其他

  • 运维
  • Linux
  • Ubuntu
JiFu
2025-01-05
目录

Ubuntu Sway开发机安装手册

# Ubuntu Sway开发机安装手册

# ① 官方地址

Ubuntu Sway (opens new window)

# ② 安装

# 添加backports源

echo "deb http://deb.debian.org/debian bookworm-backports main" | sudo tee /etc/apt/sources.list.d/backports.list
sudo apt update
1
2

# 初始化

# 修改root密码

sudo passwd
1

# 更新

sudo apt update -y
sudo apt upgrade -y
1
2

# 安装包

  • net-tools: 网络工具
  • openssh-server: SSH
  • fish: 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

# 安装软件

# 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

# ③ 配置

# 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

# 安装主题

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

# 替换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
#Ubuntu#Sway
上次更新: 2025/04/26, 06:31:51
6.Ubuntu服务器安装桌面环境
Debian服务器安装手册

← 6.Ubuntu服务器安装桌面环境 Debian服务器安装手册→

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