Cách cài đặt Sublime text 4 trên Ubuntu 22.04 và 20.04. Sublime Text là một trình soạn thảo code linh hoạt, gọn nhẹ, ít tốn tài nguyên được nhiều developer ưa chuộng hiện nay.
Cài đặt Sublime text 4 trên Ubuntu 22.04 hoặc 20.04 LTS
Repository APT chứa các gói cho cả x86-64 và arm64, để bắt đầu bạn cần Add Repository
lên hệ thống Ubuntu.
1. Cài đặt GPG keys Sublime text 4 Ubuntu 22.04 hoặc 20.04
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -

Đảm bảo APT được thiết lập để hoạt động với các nguồn https và Import APT Repository
Sublime Text 4.
sudo apt-get install apt-transport-https echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
2. Update hệ thống và cài đặt Sublime Text 4 trên Ubuntu
Sau khi bạn đã add key
và Repository, hãy cập nhật hệ thống để Repository
có hiệu lực và sau đó bạn có thể cài đặt Sublime text 4 trên Ubuntu 22.04 | 20.04 qua lệnh command trên terminal
.
sudo apt-get update sudo apt-get install sublime-text

Cài đặt Sublime text 4
Ubuntu hoàn thành, bạn sẽ tìm thấy nó khi bạn mở menu và search sublime text, bạn cũng có thể thêm nó vào thanh taskbar bằng cách nhấp chuột phải và chọn Add to Favorites
.
— Link tham khảo: https://www.sublimetext.com/docs/linux_repositories.html#apt
3. Cách sửa lỗi Key is stored in legacy trusted sublime text 4 trên Ubuntu
W: https://download.sublimetext.com/apt/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION
section in apt-key(8) for details.
Sau khi cài đặt apt-key, GPG ussign hiện không được chấp nhận trong Debian 11 và Ubuntu 22.04 LTS, một thông báo lỗi sẽ hiển thị khi bạn chạy câu lệnh sudo apt update. Cách để khắc phục điều này là chạy 2 câu lệnh dưới đây.
wget -O- https://download.sublimetext.com/sublimehq-pub.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/sublimehq-archive-keyring.gpg echo "deb [signed-by=/usr/share/keyrings/sublimehq-archive-keyring.gpg] https://download.sublimetext.com/ apt/dev/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
Sau đó, lệnh sudo apt update
hoạt động trở lại mà không có thông báo lỗi.
4. Cách gỡ bỏ, remove Sublime text Ubuntu 22.04 | 20.04
Chạy lần lượt các lệnh bên dưới để xóa hoàn toàn sublime text
trên máy tính của bạn.
sudo apt-get remove sublime-text sudo rm -rf /home/$USER/.config/sublime-text
Với Sublime text 3:
sudo rm -rf /home/$USER/.config/sublime-text-3 sudo rm -rf /etc/apt/sources.list.d/sublime-text.* sudo apt update
Trên đây là các bước hướng dẫn cách cài đặt Sublime text 4 trên Ubuntu 22.04 hoặc 20.04, cách kích hoạt Ubuntu sublime text
. Hy vọng nó sẽ giúp bạn.
– Advertising –