下載安裝

測試環境

  • Xubuntu 14.04

下載

可以到「Atom官方首頁」下載,或是到「Github」下載。

以下載「atom-amd64.deb」,版本「1.0.2」為例

Github下載

執行下面的指令下載

$ wget -c https://github.com/atom/atom/releases/download/v1.0.2/atom-amd64.deb -O atom-amd64.v1.0.2.deb

Atom官方首頁下載

執行下面的指令下載

$ wget -c https://atom.io/download/deb -O atom-amd64.v1.0.2.deb

觀看資訊

下載後觀看檔案資訊

$ dpkg -I atom-amd64.v1.0.2.deb

會顯示

new debian package, version 2.0.
size 70308678 bytes: control archive=488 bytes.
    544 bytes,    12 lines      control
Package: atom
Version: 1.0.2
Depends: git, gconf2, gconf-service, libgtk2.0-0, libudev0 | libudev1, libgcrypt11 | libgcrypt20, libnotify4, libxtst6, libnss3, python, gvfs-bin, xdg-utils, libcap2
Recommends: lsb-release
Suggests: libgnome-keyring0, gir1.2-gnomekeyring-1.0
Section: devel
Priority: optional
Architecture: amd64
Installed-Size: 206360
Maintainer: GitHub <atom@github.com>
Description: A hackable text editor for the 21st Century.
Atom is a free and open source text editor that is modern, approachable, and hackable to the core.

安裝

執行

$ sudo dpkg -i atom-amd64.v1.0.2.deb

確定認是否安裝成功

執行

$ dpkg -l atom

會顯示

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                         Version             Architecture        Description
+++-============================-===================-===================-==============================================================
ii  atom                         1.0.2               amd64               A hackable text editor for the 21st Century.

執行

$ whereis atom

顯示

atom: /usr/bin/atom /usr/bin/X11/atom /usr/share/atom

執行

$ whereis apm

顯示

atom: /usr/bin/atom /usr/bin/X11/atom /usr/share/atom

或是直接執行下面的指令,就可以了解「atom-amd64.v1.0.2.deb」安裝什麼檔案在系統上。

$ dpkg -L atom

觀看版本

執行

$ atom -v

顯示

1.0.2

執行

$ apm -v

顯示

apm -v
apm  1.0.1
npm  2.5.1
node 0.10.35
python 2.7.6
git 1.9.1

觀看指令說明

執行

$ atom -h

顯示

Atom Editor v1.0.2

Usage: atom [options] [path ...]

One or more paths to files or folders may be specified. If there is an
existing Atom window that contains all of the given folders, the paths
will be opened in that window. Otherwise, they will be opened in a new
window.

Environment Variables:

  ATOM_DEV_RESOURCE_PATH  The path from which Atom loads source code in dev mode.
                          Defaults to `~/github/atom`.

  ATOM_HOME               The root path for all configuration files and folders.
                          Defaults to `~/.atom`.

Options:
  -1, --one                  This option is no longer supported.                           [boolean]
  --include-deprecated-apis  This option is not currently supported.                       [boolean]
  -d, --dev                  Run in development mode.                                      [boolean]
  -f, --foreground           Keep the browser process in the foreground.                   [boolean]
  -h, --help                 Print this usage message.                                     [boolean]
  -l, --log-file             Log all output to file.                                        [string]
  -n, --new-window           Open a new window.                                            [boolean]
  --profile-startup          Create a profile of the startup execution time.               [boolean]
  -r, --resource-path        Set the path to the Atom source directory and enable dev-mode.
                                                                                            [string]
  -s, --spec-directory       Set the directory from which to run package specs (default: Atom's spec
                             directory).                                                    [string]
  --safe                     Do not load packages from ~/.atom/packages or ~/.atom/dev/packages.
                                                                                           [boolean]
  -t, --test                 Run the specified specs and exit with error code on failures.
                                                                                           [boolean]
  -v, --version              Print the version.                                            [boolean]
  -w, --wait                 Wait for window to be closed before returning.                [boolean]

執行

$ apm -h

顯示

apm - Atom Package Manager powered by https://atom.io

Usage: apm <command>

where <command> is one of:
    clean, config, dedupe, deinstall, delete, dev, develop, docs, erase,
    featured, home, init, install, link, linked, links, list, ln, lns, login,
    ls, open, outdated, publish, rebuild, rebuild-module-cache, remove, rm,
    search, show, star, starred, stars, test, uninstall, unlink, unpublish,
    unstar, update, upgrade, view.

Run `apm help <command>` to see the more details about a specific command.

Options:
  --color        Enable colored output                                     [boolean] [default: true]
  -v, --version  Print the apm version
  -h, --help     Print this usage message

  Prefix an option with `no-` to set it to false such as --no-color to disable
  colored output.

執行

$ apm help install

顯示

Usage: apm install [<package_name>...]
       apm install <package_name>@<package_version>
       apm install --packages-file my-packages.txt

Install the given Atom package to ~/.atom/packages/<package_name>.

If no package name is given then all the dependencies in the package.json
file are installed to the node_modules folder in the current working
directory.

A packages file can be specified that is a newline separated list of
package names to install with optional versions using the
`package-name@version` syntax.

Options:
  --check           Check that native build tools are installed                            [boolean]
  --verbose         Show verbose debug information                        [boolean] [default: false]
  --packages-file   A text file containing the packages to install                          [string]
  --production      Do not install dev dependencies                                        [boolean]
  -c, --compatible  Only install packages/themes compatible with this Atom version          [string]
  -h, --help        Print this usage message
  -s, --silent      Set the npm log level to silent                                        [boolean]
  -q, --quiet       Set the npm log level to warn                                          [boolean]

  Prefix an option with `no-` to set it to false such as --no-color to disable
  colored output.