1---
2title: Zed on Linux
3description: "The installation script on the download page is the fastest way to install Zed:"
4---
5
6# Zed on Linux
7
8## Standard Installation
9
10The installation script on the [download](https://zed.dev/download) page is the fastest way to install Zed:
11
12```sh
13curl -f https://zed.dev/install.sh | sh
14```
15
16We also offer a preview build of Zed which receives updates about a week ahead of stable. You can install it with:
17
18```sh
19curl -f https://zed.dev/install.sh | ZED_CHANNEL=preview sh
20```
21
22The Zed installed by the script works best on systems that:
23
24- have a Vulkan compatible GPU available (for example Linux on an M-series macBook)
25- have a system-wide glibc (NixOS and Alpine do not by default)
26 - x86_64 (Intel/AMD): glibc version >= 2.31 (Ubuntu 20 and newer)
27 - aarch64 (ARM): glibc version >= 2.35 (Ubuntu 22 and newer)
28
29Both Nix and Alpine have third-party Zed packages available (though they are currently a few weeks out of date). If you'd like to use our builds they do work if you install a glibc compatibility layer. On NixOS you can try [nix-ld](https://github.com/Mic92/nix-ld), and on Alpine [gcompat](https://wiki.alpinelinux.org/wiki/Running_glibc_programs).
30
31You will need to build from source for:
32
33- architectures other than 64-bit Intel or 64-bit ARM (for example a 32-bit or RISC-V machine)
34- Redhat Enterprise Linux 8.x, Rocky Linux 8, AlmaLinux 8, Amazon Linux 2 on all architectures
35- Redhat Enterprise Linux 9.x, Rocky Linux 9.3, AlmaLinux 8, Amazon Linux 2023 on aarch64 (x86_x64 OK)
36
37## Other ways to install Zed on Linux
38
39Zed is open source, and [you can install from source](./development/linux.md).
40
41### Installing via a package manager
42
43There are several third-party Zed packages for various Linux distributions and package managers, sometimes under `zed-editor`. You may be able to install Zed using these packages:
44
45- Flathub: [`dev.zed.Zed`](https://flathub.org/apps/dev.zed.Zed)
46- Arch: [`zed`](https://archlinux.org/packages/extra/x86_64/zed/)
47- Arch (AUR): [`zed-git`](https://aur.archlinux.org/packages/zed-git), [`zed-preview`](https://aur.archlinux.org/packages/zed-preview), [`zed-preview-bin`](https://aur.archlinux.org/packages/zed-preview-bin)
48- Alpine: `zed` ([aarch64](https://pkgs.alpinelinux.org/package/edge/testing/aarch64/zed)) ([x86_64](https://pkgs.alpinelinux.org/package/edge/testing/x86_64/zed))
49- Conda: [`zed`](https://anaconda.org/conda-forge/zed)
50- Nix: `zed-editor` ([unstable](https://search.nixos.org/packages?channel=unstable&show=zed-editor))
51- Fedora/Ultramarine (Terra): [`zed`](https://github.com/terrapkg/packages/tree/frawhide/anda/devs/zed/stable), [`zed-preview`](https://github.com/terrapkg/packages/tree/frawhide/anda/devs/zed/preview), [`zed-nightly`](https://github.com/terrapkg/packages/tree/frawhide/anda/devs/zed/nightly)
52- Solus: [`zed`](https://github.com/getsolus/packages/tree/main/packages/z/zed)
53- Parabola: [`zed`](https://www.parabola.nu/packages/extra/x86_64/zed/)
54- Manjaro: [`zed`](https://packages.manjaro.org/?query=zed)
55- ALT Linux (Sisyphus): [`zed`](https://packages.altlinux.org/en/sisyphus/srpms/zed/)
56- AOSC OS: [`zed`](https://packages.aosc.io/packages/zed)
57
58See [Repology](https://repology.org/project/zed-editor/versions) for a list of Zed packages in various repositories.
59
60### Community
61
62When installing a third-party package please be aware that it may not be completely up to date and may be slightly different from the Zed we package (a common change is to rename the binary to `zedit` or `zeditor` to avoid conflicting with other packages).
63
64We'd love your help making Zed available for everyone. If Zed is not yet available for your package manager, and you would like to fix that, we have some notes on [how to do it](./development/linux.md#notes-for-packaging-zed).
65
66The packages in this section provide binary installs for Zed but are not official packages within the associated distributions. These packages are maintained by community members and as such a higher level of caution should be taken when installing them.
67
68#### Debian and Ubuntu
69
70Zed is available in [this community-maintained repository](https://debian.griffo.io/).
71
72Instructions for each version are available in the README of the repository where packages are built.
73Build, packaging and instructions for each version are available in the README of the [repository](https://github.com/dariogriffo/zed-debian)
74
75### Downloading manually
76
77If you'd prefer, you can install Zed by downloading our pre-built .tar.gz. This is the same artifact that our install script uses, but you can customize the location of your installation by modifying the instructions below:
78
79Download the `.tar.gz` file:
80
81- [zed-linux-x86_64.tar.gz](https://cloud.zed.dev/releases/stable/latest/download?asset=zed&arch=x86_64&os=linux&source=docs)
82 ([preview](https://cloud.zed.dev/releases/preview/latest/download?asset=zed&arch=x86_64&os=linux&source=docs))
83- [zed-linux-aarch64.tar.gz](https://cloud.zed.dev/releases/stable/latest/download?asset=zed&arch=aarch64&os=linux&source=docs)
84 ([preview](https://cloud.zed.dev/releases/preview/latest/download?asset=zed&arch=aarch64&os=linux&source=docs))
85
86Then ensure that the `zed` binary in the tarball is on your path. The easiest way is to unpack the tarball and create a symlink:
87
88```sh
89mkdir -p ~/.local
90# extract zed to ~/.local/zed.app/
91tar -xvf <path/to/download>.tar.gz -C ~/.local
92# link the zed binary to ~/.local/bin (or another directory in your $PATH)
93ln -sf ~/.local/zed.app/bin/zed ~/.local/bin/zed
94```
95
96If you'd like integration with an XDG-compatible desktop environment, you will also need to install the `.desktop` file:
97
98```sh
99install -D ~/.local/zed.app/share/applications/dev.zed.Zed.desktop -t ~/.local/share/applications
100sed -i "s|Icon=zed|Icon=$HOME/.local/zed.app/share/icons/hicolor/512x512/apps/zed.png|g" ~/.local/share/applications/dev.zed.Zed.desktop
101sed -i "s|Exec=zed|Exec=$HOME/.local/zed.app/bin/zed|g" ~/.local/share/applications/dev.zed.Zed.desktop
102```
103
104## Uninstalling Zed
105
106### Standard Uninstall
107
108If Zed was installed using the default installation script, it can be uninstalled by supplying the `--uninstall` flag to the `zed` shell command
109
110```sh
111zed --uninstall
112```
113
114If there are no errors, the shell will then prompt you whether you'd like to keep your preferences or delete them. After making a choice, you should see a message that Zed was successfully uninstalled.
115
116In the case that the `zed` shell command was not found in your PATH, you can try one of the following commands
117
118```sh
119$HOME/.local/bin/zed --uninstall
120```
121
122or
123
124```sh
125$HOME/.local/zed.app/bin.zed --uninstall
126```
127
128The first case might fail if a symlink was not properly established between `$HOME/.local/bin/zed` and `$HOME/.local/zed.app/bin.zed`. But the second case should work as long as Zed was installed to its default location.
129
130If Zed was installed to a different location, you must invoke the `zed` binary stored in that installation directory and pass the `--uninstall` flag to it in the same format as the previous commands.
131
132### Package Manager
133
134If Zed was installed using a package manager, please consult the documentation for that package manager on how to uninstall a package.
135
136## Troubleshooting
137
138Linux works on a large variety of systems configured in many different ways. We primarily test Zed on a vanilla Ubuntu setup, as it is the most common distribution our users use, that said we do expect it to work on a wide variety of machines.
139
140### Zed fails to start
141
142If you see an error like "/lib64/libc.so.6: version 'GLIBC_2.29' not found" it means that your distribution's version of glibc is too old. You can either upgrade your system, or [install Zed from source](./development/linux.md).
143
144### Graphics issues
145
146#### Zed fails to open windows
147
148Zed requires a GPU to run effectively. Under the hood, we use [Vulkan](https://www.vulkan.org/) to communicate with your GPU. If you are seeing problems with performance, or Zed fails to load, it is possible that Vulkan is the culprit.
149
150If you see a notification saying `Zed failed to open a window: NoSupportedDeviceFound` this means that Vulkan cannot find a compatible GPU. you can try running [vkcube](https://github.com/krh/vkcube) (usually available as part of the `vulkaninfo` or `vulkan-tools` package on various distributions) to try to troubleshoot where the issue is coming from like so:
151
152```
153vkcube
154```
155
156> **_Note_**: Try running in both X11 and wayland modes by running `vkcube -m [x11|wayland]`. Some versions of `vkcube` use `vkcube` to run in X11 and `vkcube-wayland` to run in wayland.
157
158This should output a line describing your current graphics setup and show a rotating cube. If this does not work, you should be able to fix it by installing Vulkan compatible GPU drivers, however in some cases there is no Vulkan support yet.
159
160You can find out which graphics card Zed is using by looking in the Zed log (`~/.local/share/zed/logs/Zed.log`) for `Using GPU: ...`.
161
162If you see errors like `ERROR_INITIALIZATION_FAILED` or `GPU Crashed` or `ERROR_SURFACE_LOST_KHR` then you may be able to work around this by installing different drivers for your GPU, or by selecting a different GPU to run on. (See [#14225](https://github.com/zed-industries/zed/issues/14225))
163
164On some systems the file `/etc/prime-discrete` can be used to enforce the use of a discrete GPU using [PRIME](https://wiki.archlinux.org/title/PRIME). Depending on the details of your setup, you may need to change the contents of this file to "on" (to force discrete graphics) or "off" (to force integrated graphics).
165
166On others, you may be able to the environment variable `DRI_PRIME=1` when running Zed to force the use of the discrete GPU.
167
168If you're using an AMD GPU, you might get a 'Broken Pipe' error. Try using the RADV or Mesa drivers. (See [#13880](https://github.com/zed-industries/zed/issues/13880))
169
170If you are using `amdvlk`, the default open-source AMD graphics driver, you may find that Zed consistently fails to launch. This is a known issue for some users, for example on Omarchy (see issue [#28851](https://github.com/zed-industries/zed/issues/28851)). To fix this, you will need to use a different driver. We recommend removing the `amdvlk` and `lib32-amdvlk` packages and installing `vulkan-radeon` instead (see issue [#14141](https://github.com/zed-industries/zed/issues/14141)).
171
172For more information, the [Arch guide to Vulkan](https://wiki.archlinux.org/title/Vulkan) has some good steps that translate well to most distributions.
173
174#### Forcing Zed to use a specific GPU
175
176There are a few different ways to force Zed to use a specific GPU:
177
178##### Option A
179
180You can use the `ZED_DEVICE_ID={device_id}` environment variable to specify the device ID of the GPU you wish to have Zed use.
181
182You can obtain the device ID of your GPU by running `lspci -nn | grep VGA` which will output each GPU on one line like:
183
184```
18508:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA104 [GeForce RTX 3070] [10de:2484] (rev a1)
186```
187
188where the device ID here is `2484`. This value is in hexadecimal, so to force Zed to use this specific GPU you would set the environment variable like so:
189
190```
191ZED_DEVICE_ID=0x2484 zed
192```
193
194Make sure to export the variable if you choose to define it globally in a `.bashrc` or similar.
195
196##### Option B
197
198If you are using Mesa, you can run `MESA_VK_DEVICE_SELECT=list zed --foreground` to get a list of available GPUs and then export `MESA_VK_DEVICE_SELECT=xxxx:yyyy` to choose a specific device. Furthermore, you can fallback to xwayland with an additional export of `WAYLAND_DISPLAY=""`.
199
200##### Option C
201
202Using [vkdevicechooser](https://github.com/jiriks74/vkdevicechooser).
203
204#### Reporting graphics issues
205
206If Vulkan is configured correctly, and Zed is still not working for you, please [file an issue](https://github.com/zed-industries/zed) with as much information as possible.
207
208When reporting issues where Zed fails to start due to graphics initialization errors on GitHub, it can be impossible to run the `zed: copy system specs into clipboard` command like we instruct you to in our issue template. We provide an alternative way to collect the system specs specifically for this situation.
209
210Passing the `--system-specs` flag to Zed like
211
212```sh
213zed --system-specs
214```
215
216will print the system specs to the terminal like so. It is strongly recommended to copy the output verbatim into the issue on GitHub, as it uses markdown formatting to ensure the output is readable.
217
218Additionally, it is extremely beneficial to provide the contents of your Zed log when reporting such issues. The log is usually located at `~/.local/share/zed/logs/Zed.log`. The recommended process for producing a helpful log file is as follows:
219
220```sh
221truncate -s 0 ~/.local/share/zed/logs/Zed.log # Clear the log file
222ZED_LOG=wgpu=info zed .
223cat ~/.local/share/zed/logs/Zed.log
224# copy the output
225```
226
227Or, if you have the Zed cli setup, you can do
228
229```sh
230ZED_LOG=wgpu=info /path/to/zed/cli --foreground .
231# copy the output
232```
233
234It is also highly recommended when pasting the log into a github issue, to do so with the following template:
235
236> **_Note_**: The whitespace in the template is important, and will cause incorrect formatting if not preserved.
237
238````
239<details><summary>Zed Log</summary>
240
241```
242{zed log contents}
243```
244
245</details>
246````
247
248This will cause the logs to be collapsed by default, making it easier to read the issue.
249
250### I can't open any files
251
252### Clicking links isn't working
253
254These features are provided by XDG desktop portals, specifically:
255
256- `org.freedesktop.portal.FileChooser`
257- `org.freedesktop.portal.OpenURI`
258
259Some window managers, such as `Hyprland`, don't provide a file picker by default. See [this list](https://wiki.archlinux.org/title/XDG_Desktop_Portal#List_of_backends_and_interfaces) as a starting point for alternatives.
260
261### Zed isn't remembering my API keys
262
263### Zed isn't remembering my login
264
265These feature also requires XDG desktop portals, specifically:
266
267- `org.freedesktop.portal.Secret` or
268- `org.freedesktop.Secrets`
269
270Zed needs a place to securely store secrets such as your Zed login cookie or your OpenAI API Keys and we use a system provided keychain to do this. Examples of packages that provide this are `gnome-keyring`, `KWallet` and `keepassxc` among others.
271
272### Could not start inotify
273
274Zed relies on inotify to watch your filesystem for changes. If you cannot start inotify then Zed will not work reliably.
275
276If you are seeing "too many open files" then first try `sysctl fs.inotify`.
277
278- You should see that max_user_instances is 128 or higher (you can change the limit with `sudo sysctl fs.inotify.max_user_instances=1024`). Zed needs only 1 inotify instance.
279- You should see that `max_user_watches` is 8000 or higher (you can change the limit with `sudo sysctl fs.inotify.max_user_watches=64000`). Zed needs one watch per directory in all your open projects + one per git repository + a handful more for settings, themes, keymaps, extensions.
280
281It is also possible that you are running out of file descriptors. You can check the limits with `ulimit` and update them by editing `/etc/security/limits.conf`.
282
283### No sound or wrong output device
284
285If you're not hearing any sound in Zed or the audio is routed to the wrong device, it could be due to a mismatch between audio systems. Zed relies on ALSA, while your system may be using PipeWire or PulseAudio. To resolve this, you need to configure ALSA to route audio through PipeWire/PulseAudio.
286
287If your system uses PipeWire:
288
2891. **Install the PipeWire ALSA plugin**
290
291 On Debian-based systems, run:
292
293 ```bash
294 sudo apt install pipewire-alsa
295 ```
296
2972. **Configure ALSA to use PipeWire**
298
299 Add the following configuration to your ALSA settings file. You can use either `~/.asoundrc` (user-level) or `/etc/asound.conf` (system-wide):
300
301 ```bash
302 pcm.!default {
303 type pipewire
304 }
305
306 ctl.!default {
307 type pipewire
308 }
309 ```
310
3113. **Restart your system**
312
313### Forcing X11 scale factor
314
315On X11 systems, Zed automatically detects the appropriate scale factor for high-DPI displays. The scale factor is determined using the following priority order:
316
3171. `GPUI_X11_SCALE_FACTOR` environment variable (if set)
3182. `Xft.dpi` from X resources database (xrdb)
3193. Automatic detection via RandR based on monitor resolution and physical size
320
321If you want to customize the scale factor beyond what Zed detects automatically, you have several options:
322
323#### Check your current scale factor
324
325You can verify if you have `Xft.dpi` set:
326
327```sh
328xrdb -query | grep Xft.dpi
329```
330
331If this command returns no output, Zed is using RandR (X11's monitor management extension) to automatically calculate the scale factor based on your monitor's reported resolution and physical dimensions.
332
333#### Option 1: Set Xft.dpi (X Resources Database)
334
335`Xft.dpi` is a standard X11 setting that many applications use for consistent font and UI scaling. Setting this ensures Zed scales the same way as other X11 applications that respect this setting.
336
337Edit or create the `~/.Xresources` file:
338
339```sh
340vim ~/.Xresources
341```
342
343Add this line with your desired DPI:
344
345```sh
346Xft.dpi: 96
347```
348
349Common DPI values:
350
351- `96` for standard 1x scaling
352- `144` for 1.5x scaling
353- `192` for 2x scaling
354- `288` for 3x scaling
355
356Load the configuration:
357
358```sh
359xrdb -merge ~/.Xresources
360```
361
362Restart Zed for the changes to take effect.
363
364#### Option 2: Use the GPUI_X11_SCALE_FACTOR environment variable
365
366This Zed-specific environment variable directly sets the scale factor, bypassing all automatic detection.
367
368```sh
369GPUI_X11_SCALE_FACTOR=1.5 zed
370```
371
372You can use decimal values (e.g., `1.25`, `1.5`, `2.0`) or set `GPUI_X11_SCALE_FACTOR=randr` to force RandR-based detection even when `Xft.dpi` is set.
373
374To make this permanent, add it to your shell profile or desktop entry.
375
376#### Option 3: Adjust system-wide RandR DPI
377
378This changes the reported DPI for your entire X11 session, affecting how RandR calculates scaling for all applications that use it.
379
380Add this to your `.xprofile` or `.xinitrc`:
381
382```sh
383xrandr --dpi 192
384```
385
386Replace `192` with your desired DPI value. This affects the system globally and will be used by Zed's automatic RandR detection when `Xft.dpi` is not set.
387
388### Font rendering parameters
389
390On Linux, Zed reads `ZED_FONTS_GAMMA` and `ZED_FONTS_GRAYSCALE_ENHANCED_CONTRAST` environment variables for the values to use for font rendering.
391
392`ZED_FONTS_GAMMA` corresponds to [getgamma](https://learn.microsoft.com/en-us/windows/win32/api/dwrite/nf-dwrite-idwriterenderingparams-getgamma) values.
393Allowed range [1.0, 2.2], other values are clipped.
394Default: 1.8
395
396`ZED_FONTS_GRAYSCALE_ENHANCED_CONTRAST` corresponds to [getgrayscaleenhancedcontrast](https://learn.microsoft.com/en-us/windows/win32/api/dwrite_1/nf-dwrite_1-idwriterenderingparams1-getgrayscaleenhancedcontrast) values.
397Allowed range: [0.0, ..), other values are clipped.
398Default: 1.0