We recommend that you use the Sublime Editor, which is much easier to use than vim. After decompression, it can be used directly, but it is inconvenient to switch to its path. In Ubuntu, add the sublime path to the environment variable, and directly enter sublime in the future. The sublime_text executable file is in the/root/Downloads/SublimeText2 directory. In order to directly input sublime to execute sublime_text, enter the following content on the terminal:
We recommend that you use the Sublime Editor, which is much easier to use than vim. After decompression, it can be used directly, but it is inconvenient to switch to its path. In Ubuntu, add the sublime path to the environment variable, and directly enter sublime in the future.
The sublime_text executable file is in the/root/Downloads/Sublime Text 2 directory. In order to directly input sublime to execute sublime_text, enter the following content on the terminal:
# Cp sublime_text sublime
There are two methods: the first method takes effect after logon, but it is permanent; the second method takes effect immediately, but only valid on the current terminal.
Method 1:
# Gedit/etc/environment
The content of the environment file is as follows:
PATH = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
Add the Sublime path (Note: The paths are separated by colons ):
PATH = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games: /root/Downloads/Sublime Text 2"
Save and log on again.
# Echo $ PATH
/Usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games: /root/Downloads/Sublime Text 2
Check the current PATH environment variable. We can see that the Sublime PATH has been added to the environment variable.
Enter sublime in the terminal to use it.
Method 2:
// Add a new PATH to the PATH environment variable.
# Export PATH = $ PATH:/root/Downloads/Sublime \ Text \ 2
Note: # The command is later. # indicates the Command executed by a Super User.
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2