本文介绍在Linux系统中安装Sublime Text 4的方法,提供针对Ubuntu(apt)、Debian(apt)、Arch(pacman)、CentOS(yum)、Fedora(dnf)、openSUSE(zypper)系统的安装方法。以下采用的方法是Linux软件包管理器存储库,用户也可自行下载sublime_text_build_4107_x64.tar.xz或sublime_text_build_4107_arm64.tar.xz等软件包安装。
apt方式:针对Ubuntu、Debian 安装GPG密钥: wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - 确保将apt设置为可与https来源一起使用: sudo apt-get install apt-transport-https 选择要使用的频道: Stable(稳定版): echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list Dev(开发版): echo "deb https://download.sublimetext.com/ apt/dev/" | sudo tee /etc/apt/sources.list.d/sublime-text.list 更新apt源并安装Sublime Text: sudo apt-get update sudo apt-get install sublime-text 参考:在Ubuntu 20.04系统上安装Sublime Text 3源代码编辑器。
pacman方式:针对Arch 安装GPG密钥: curl -O https://download.sublimetext.com/sublimehq-pub.gpg && sudo pacman-key --add sublimehq-pub.gpg && sudo pacman-key --lsign-key 8A8F901A && rm sublimehq-pub.gpg 选择要使用的频道: Stable(稳定版): echo -e "\n[sublime-text]\nServer = https://download.sublimetext.com/arch/stable/x86_64" | sudo tee -a /etc/pacman.conf Dev(开发版): echo -e "\n[sublime-text]\nServer = https://download.sublimetext.com/arch/dev/x86_64" | sudo tee -a /etc/pacman.conf 更新pacman并安装Sublime Text: sudo pacman -Syu sublime-text
yum方式:针对CentOS 安装GPG密钥: sudo rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg 选择要使用的频道: Stable(稳定版): sudo yum-config-manager --add-repo https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo Dev(开发版): sudo yum-config-manager --add-repo https://download.sublimetext.com/rpm/dev/x86_64/sublime-text.repo 更新yum并安装Sublime Text: sudo yum install sublime-text
dnf方式:针对Fedora 安装GPG密钥: sudo rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg 选择要使用的频道: Stable(稳定版): sudo dnf config-manager --add-repo https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo Dev(开发版): sudo dnf config-manager --add-repo https://download.sublimetext.com/rpm/dev/x86_64/sublime-text.repo 更新dnf并安装Sublime Text: sudo dnf install sublime-text
zypper方式:针对openSUSE 安装GPG密钥: sudo rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg 选择要使用的频道: Stable(稳定版): sudo zypper addrepo -g -f https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo Dev(开发版): sudo zypper addrepo -g -f https://download.sublimetext.com/rpm/dev/x86_64/sublime-text.repo 更新zypper并安装Sublime Text: sudo zypper install sublime-text
相关主题 |