我的系统是centos7,已经安装了图形界面
1.执行命令wget https://download.sublimetext.com/sublime_text_3_build_3126_x64.tar.bz2 进行下载
[root@localhost 下载]# wget https://download.sublimetext.com/sublime_text_3_build_3126_x64.tar.bz2
--2021-05-15 16:56:52-- https://download.sublimetext.com/sublime_text_3_build_3126_x64.tar.bz2
正在解析主机 download.sublimetext.com (download.sublimetext.com)... 104.236.0.104
正在连接 download.sublimetext.com (download.sublimetext.com)|104.236.0.104|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:9313954 (8.9M) [application/octet-stream]
正在保存至: “sublime_text_3_build_3126_x64.tar.bz2”
100%[======================================>] 9,313,954 977KB/s 用时 14s
2021-05-15 16:57:08 (639 KB/s) - 已保存 “sublime_text_3_build_3126_x64.tar.bz2” [9313954/9313954])
2.下载完成进行解压,执行tar -xvvf sublime_text_3_build_3126_x64.tar.bz2 解压
[root@localhost 下载]# tar -xvvf sublime_text_3_build_3126_x64.tar.bz2
drwxrwxr-x root/root 0 2016-09-23 18:13 sublime_text_3/
drwxrwxr-x root/root 0 2016-09-23 18:13 sublime_text_3/Packages/
-rw-rw-r-- root/root 5043 2016-09-23 18:13 sublime_text_3/Packages/Pascal.sublime-package
-rw-rw-r-- root/root 83117 2016-09-23 18:13 sublime_text_3/Packages/Matlab.sublime-package
-rw-rw-r-- root/root 37474 2016-09-23 18:13 sublime_text_3/Packages/Go.sublime-package
-rw-rw-r-- root/root 3157 2016-09-23 18:13 sublime_text_3/Packages/Graphviz.sublime-package
-rw-rw-r-- root/root 18559 2016-09-23 18:13 sublime_text_3/Packages/Haskell.sublime-package
-rw-rw-r-- root/root 49272 2016-09-23 18:13 sublime_text_3/Packages/Clojure.sublime-package
-rw-rw-r-- root/root 22048 2016-09-23 18:13 sublime_text_3/Packages/TCL.sublime-package
-rw-rw-r-- root/root 174776 2016-09-23 18:13 sublime_text_3/Packages/C++.sublime-package
-rw-rw-r-- root/root 28063 2016-09-23 18:13 sublime_text_3/Packages/C#.sublime-package
-rw-rw-r-- root/root 13225 2016-09-23 18:13 sublime_text_3/Packages/Textile.sublime-package
...
3.解压完成以后,移动到/opt/这个目录下,这个目录是方软件的,执行mv sublime_text_3 /opt/
[root@localhost 下载]# mv sublime_text_3 /opt/
4.创一个快捷键执行cp /opt/sublime_text_3/sublime_text.desktop /usr/share/applications
[root@localhost 下载]# cp /opt/sublime_text_3/sublime_text.desktop /usr/share/applications
5.配置Sublime Text,vim /usr/share/applications/sublime_text.desktop执行命令更改配置文件
[root@localhost 下载]# vim /usr/share/applications/sublime_text.desktop
[Desktop Entry]
Version=1.0
Type=Application
Name=Sublime Text
GenericName=Text Editor
Comment=Sophisticated text editor for code, markup and prose
Exec=/opt/sublime_text_3/sublime_text %F
Terminal=false
MimeType=text/plain;
Icon=/opt/sublime_text_3/sublime_text %F
Categories=TextEditor;Development;
StartupNotify=true
Actions=Window;Document;
[Desktop Action Window]
Name=New Window
Exec=/opt/sublime_text/sublime_text -n
OnlyShowIn=Unity;
[Desktop Action Document]
Name=New File
Exec=/opt/sublime_text/sublime_text --command new_file
OnlyShowIn=Unity;
主要改Exec和Icon那两行。
6.配置完成以后打开软件applications->programming->Sublime Text打开软件