From Fedora Project Wiki

(Creating page.)
 
(Adding building from source and ext links sections)
Line 37: Line 37:
$ sudo dnf install atom
$ sudo dnf install atom
</pre>
</pre>
=== Building from source ===
There is an [https://github.com/atom/atom/blob/master/docs/build-instructions/linux.md official guide] to installing Atom from source code on Linux.
== External links ==
* [https://ask.fedoraproject.org/en/questions/scope:all/sort:activity-desc/tags:atom/page:1/ Ask Fedora questions with the atom tag]

Revision as of 19:39, 13 December 2016

Atom is an open-source, configurable yet beginner-friendly text editor developed by GitHub. It is built using web technologies on top of the Electron framework.

Installation

Its development team provides Debian, RPM and tar (file extension: .tar.gz) binaries for 64-bit Linux, but not for 32-bit systems. There are three main ways of installing Atom:

1. Using official binary releases from the Atom development team (suitable for 64-bit systems only).

2. Using the unofficial mosquito/atom Copr (for 32-bit and 64-bit systems).

3. By manually compiling its source code and installing the resulting RPM.

The fastest of these methods is probably #1. This option does not have auto-updating, however, so when new releases of Atom come out in order to upgrade you will have to manually re-download and install the RPMs of these newer releases. Option 2 is fairly fast too, but the Copr does tend to lag a couple of days behind the latest Atom release. Despite this the Copr option does have auto-updating.

Official binaries

To install Atom from the official RPM package provide by the Atom team (which is only suitable for 64-bit systems!) for the latest stable (as opposed to beta releases which are also packaged at RPMs) Atom release, run:

$ sudo dnf install $(wget -q "https://api.github.com/repos/atom/atom/releases/latest"  -O - | grep "https.*atom.x86_64.rpm" | cut -d '"' -f 4)

While there is no official way to auto-update these binaries here is a ~/.bashrc (also compatible with the Zsh shell's ~/.zshrc file) snippet that will automatically check for available Atom updates and install them whenever one opens a terminal:

ATOM_INSTALLED_VERSION=$(rpm -qi atom | grep "Version" |  cut -d ':' -f 2 | cut -d ' ' -f 2)
ATOM_LATEST_VERSION=$(wget -q "https://api.github.com/repos/atom/atom/releases/latest"  -O - | grep -E "https.*atom-amd64.tar.gz" | cut -d '"' -f 4 | cut -d '/' -f 8 | sed 's/v//g')

if [[ $ATOM_INSTALLED_VERSION < $ATOM_LATEST_VERSION ]]; then
  sudo dnf install -y https://github.com/atom/atom/releases/download/v${ATOM_LATEST_VERSION}/atom.x86_64.rpm
fi

Copr

To install Atom from the mosquito/atom Copr run:

$ sudo dnf copr enable mosquito/atom 
$ sudo dnf install atom

Building from source

There is an official guide to installing Atom from source code on Linux.

External links