You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu 16.04下tar.bz2格式软件安装方法(含Sublime Text)

Hey there! Let's break down how to install software packaged as .tar.bz2 on Ubuntu 16.04, with a step-by-step guide specifically for Sublime Text since that's your priority.

General Workflow for .tar.bz2 Files

First, a quick overview of the typical process for most software in this format—though note some apps (like Sublime) skip the compilation step:

  • Extract the archive: Use the tar command to unpack the file. The standard syntax is:
    tar -xjvf your-file-name.tar.bz2
    
    Let's break down the flags: x = extract, j = handle bzip2 compression, v = verbose (shows progress), f = specify the archive file.
  • Check for installation instructions: Always look for a README or INSTALL file in the extracted directory. Run cat README or cat INSTALL to see if the app requires special steps (like compiling with configure/make).
  • Install (if needed): For compiled software, you'll usually run:
    ./configure
    make
    sudo make install
    
    But many pre-built apps (like Sublime) just need to be moved to a system directory and set up with shortcuts.
Step-by-Step: Install Sublime Text from .tar.bz2

Sublime Text is a pre-built binary, so no compilation is required—here's how to get it set up properly:

  1. Download the correct archive: Grab the Ubuntu 64-bit (or 32-bit if your system is 32-bit) .tar.bz2 package (pick a version compatible with Ubuntu 16.04—Sublime Text 3 builds up to 3211 work well).
  2. Extract the archive: Open a terminal, navigate to the directory where you downloaded the file, and run:
    tar -xjvf sublime_text_3_build_3211_x64.tar.bz2
    
    (Replace the filename with the exact name of your downloaded file.)
  3. Move the folder to a system directory: We'll use /opt—this is the standard location for third-party system-wide apps:
    sudo mv sublime_text_3 /opt/
    
  4. Create a desktop shortcut: This lets you launch Sublime from your applications menu. Create a .desktop file with:
    sudo nano /usr/share/applications/sublime-text.desktop
    
    Paste this content into the editor:
    [Desktop Entry]
    Version=1.0
    Type=Application
    Name=Sublime Text
    Comment=Sophisticated text editor for code, markup and prose
    Exec=/opt/sublime_text_3/sublime_text
    Terminal=false
    Icon=/opt/sublime_text_3/Icon/48x48/sublime-text.png
    Categories=TextEditor;Development;
    StartupNotify=true
    
    Save and exit by pressing Ctrl+O, hitting Enter, then Ctrl+X.
  5. Add a terminal shortcut: For quick access from the command line, create a symbolic link:
    sudo ln -s /opt/sublime_text_3/sublime_text /usr/local/bin/subl
    
    Now you can open any file or folder directly by running subl filename or subl /path/to/folder.

That's it! Sublime Text should now show up in your applications list and be accessible from the terminal. For other .tar.bz2 apps, just follow the general workflow above and check their specific README for any extra steps.

内容的提问来源于stack exchange,提问作者BlindCoder

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 10:20:05