blob: 2c9351409275afc1d721ac5507364bbafde3b7f6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
---
title: "Use Snap to install the Hugo edge version on Fedora and Ubuntu"
date: 2018-10-26T12:59:51-05:00
publishdate: 2018-10-26
lastmod: 2018-10-26
draft: false
aliases:
- /use-snap-to-install-the-hugo-edge-version-on-fedora/
---
If you are using the Fedora or Ubuntu Linux distributions -- I'm currently on Fedora 28 -- and would like to [help test the latest development version of Hugo](https://discourse.gohugo.io/t/help-test-upcoming-hugo-0-50/14880), or if you just want to be on the bleeding-edge of things, this post is for you.
## Fedora-only steps
To get started, [install Snap on Fedora](https://docs.snapcraft.io/installing-snap-on-fedora/6755):
```
sudo dnf install snapd
```
Add the [Snap directory](https://docs.snapcraft.io/commands-and-aliases/3950) to your `PATH` by adding this line to your `~/.bashrc` file. Then restart your terminal to pick up the change:
```
export PATH="$PATH:/var/lib/snapd/snap/bin"
```
## Ubuntu-only steps
Ubuntu 16.04 and above come with [Snap already installed](https://docs.snapcraft.io/installing-snap-on-ubuntu/6740). If you're using an older Ubuntu version, install Snap by running:
```
sudo apt update && sudo apt install snapd
```
Check if the Snap directory is on your `PATH` by listing each entry:
```
echo $PATH | tr ':' '\n'
```
If you don't see `/snap/bin` listed, then add this line to your `~/.bashrc` file. Then restart your terminal to pick up the change:
```
export PATH="$PATH:/snap/bin"
```
## Install Hugo
See which Snap channels are available for Hugo:
```
snap info hugo
```
Install Hugo from the edge channel:
```
sudo snap install hugo --channel=edge
```
Or, if you prefer Hugo Extended -- which has the [Hugo Pipes](https://gohugo.io/hugo-pipes/) feature -- install it from the extended edge channel:
```
sudo snap install hugo --channel=extended/edge
```
Lastly, confirm the location and version of Hugo that was intalled:
```
which hugo && hugo version
```
Happy testing :)
## Update or remove Hugo
Snaps are [updated automatically](https://docs.snapcraft.io/keeping-snaps-up-to-date/7022). To manually update Hugo:
```
sudo snap refresh hugo
```
To remove Hugo:
```
sudo snap remove hugo
```
|