Skip to content

Commit deb92f9

Browse files
committed
update linux installation docs
1 parent 894be03 commit deb92f9

File tree

2 files changed

+93
-30
lines changed

2 files changed

+93
-30
lines changed

README.md

Lines changed: 21 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -107,48 +107,40 @@ MSI installers are available for download on the [releases page][].
107107

108108
### Debian/Ubuntu Linux
109109

110-
Install and upgrade:
111-
112-
1. Download the `.deb` file from the [releases page][];
113-
2. Install the downloaded file: `sudo apt install ./gh_*_linux_amd64.deb`
114-
115-
### Fedora Linux
116-
117-
Install and upgrade:
118-
119-
1. Download the `.rpm` file from the [releases page][];
120-
2. Install the downloaded file: `sudo dnf install gh_*_linux_amd64.rpm`
121-
122-
### Centos Linux
123-
124-
Install and upgrade:
125-
126-
1. Download the `.rpm` file from the [releases page][];
127-
2. Install the downloaded file: `sudo yum localinstall gh_*_linux_amd64.rpm`
110+
Install:
128111

129-
### openSUSE/SUSE Linux
112+
```bash
113+
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0
114+
sudo apt-add-repository -u https://cli.github.com/packages
115+
sudo apt install gh
116+
```
130117

131-
Install and upgrade:
118+
Upgrade:
132119

133-
1. Download the `.rpm` file from the [releases page][];
134-
2. Install the downloaded file: `sudo zypper in gh_*_linux_amd64.rpm`
120+
```
121+
sudo apt update
122+
sudo apt install gh
123+
```
135124

136-
### Arch Linux
125+
### Fedora, Centos, Red Hat Linux
137126

138-
Arch Linux users can install from the [community repo][arch linux repo]:
127+
Install:
139128

140129
```bash
141-
pacman -S github-cli
130+
sudo dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
131+
sudo dnf install gh
142132
```
143133

144-
### Android
145-
146-
Android users can install via Termux:
134+
Upgrade:
147135

148136
```bash
149-
pkg install gh
137+
sudo dnf install gh
150138
```
151139

140+
### Other Linux
141+
142+
See [Linux installation docs](/docs/install_linux.md)
143+
152144
### Other platforms
153145

154146
Download packaged binaries from the [releases page][].
@@ -164,5 +156,4 @@ See here on how to [build GitHub CLI from source][build from source].
164156
[hub]: https://github.com/github/hub
165157
[contributing page]: https://github.com/cli/cli/blob/trunk/.github/CONTRIBUTING.md
166158
[gh-vs-hub]: /docs/gh-vs-hub.md
167-
[arch linux repo]: https://www.archlinux.org/packages/community/x86_64/github-cli
168159
[build from source]: /docs/source.md

docs/install_linux.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Installing gh on Linux
2+
3+
The core, paid developers of `gh` officially support a `.deb` repository and a `.rpm` repository. We
4+
primarily test against Ubuntu and Fedora but do our best to support other distros that can work with
5+
our repositories. We focus on support for `amd64` and `i386` architectures.
6+
7+
All other combinations of distro, packaging, or architecture should be considered community
8+
supported.
9+
10+
## Official methods
11+
12+
### Debian/Ubuntu Linux (apt)
13+
14+
Install:
15+
16+
```bash
17+
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0
18+
sudo apt-add-repository -u https://cli.github.com/packages
19+
sudo apt install gh
20+
```
21+
22+
Upgrade:
23+
24+
```
25+
sudo apt update
26+
sudo apt install gh
27+
```
28+
29+
### Fedora, Centos, Red Hat Linux (dnf)
30+
31+
Install:
32+
33+
```bash
34+
sudo dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
35+
sudo dnf install gh
36+
```
37+
38+
Upgrade:
39+
40+
```bash
41+
sudo dnf install gh
42+
```
43+
44+
## Community supported methods
45+
46+
### openSUSE/SUSE Linux
47+
48+
It's possible that https://cli.github.com/packages/rpm/gh-cli.repo will work with zypper but it
49+
hasn't been tested. Otherwise, to install from package:
50+
51+
Install and upgrade:
52+
53+
1. Download the `.rpm` file from the [releases page][];
54+
2. Install the downloaded file: `sudo zypper in gh_*_linux_amd64.rpm`
55+
56+
### Arch Linux
57+
58+
Arch Linux users can install from the [community repo][arch linux repo]:
59+
60+
```bash
61+
pacman -S github-cli
62+
```
63+
64+
### Android
65+
66+
Android users can install via Termux:
67+
68+
```bash
69+
pkg install gh
70+
```
71+
72+
[arch linux repo]: https://www.archlinux.org/packages/community/x86_64/github-cli

0 commit comments

Comments
 (0)