Created
October 17, 2025 08:26
-
-
Save amavlyanov/df65ed10800aa9206469611ca788adce to your computer and use it in GitHub Desktop.
Install latest stable Zed Editor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -eux | |
| # default install dir | |
| INSTALL_LOCATION="$HOME/.local/opt" | |
| ARCH="x86_64" # may be "x86_64" or "aarch64" | |
| ZED_ARCHIVE="zed-linux-${ARCH}.tar.gz" | |
| ZED_INSTALL_PATH="${INSTALL_LOCATION}/zed.app" | |
| # create install dir | |
| mkdir -p "${INSTALL_LOCATION}" | |
| # create bin dir | |
| mkdir -p "$HOME/.local/bin" | |
| # create applications dir | |
| mkdir -p "$HOME/.local/share/applications" | |
| if ! wget -q -O "$HOME/tmp/${ZED_ARCHIVE}" "https://zed.dev/api/releases/stable/latest/${ZED_ARCHIVE}"; then | |
| printf "Download failed!\n" | |
| exit 1 | |
| fi | |
| # extract zed | |
| tar -xvf "${ZED_ARCHIVE}" -C "${INSTALL_LOCATION}" | |
| ln -sf "${ZED_INSTALL_PATH}/bin/zed" "$HOME/.local/bin/zed" | |
| # copy default desktop file | |
| cp "${ZED_INSTALL_PATH}/share/applications/zed.desktop" ~/.local/share/applications/dev.zed.Zed.desktop | |
| sed -i "s|Icon=zed|Icon=${ZED_INSTALL_PATH}/share/icons/hicolor/512x512/apps/zed.png|g" ~/.local/share/applications/dev.zed.Zed.desktop | |
| sed -i "s|Exec=zed|Exec=${ZED_INSTALL_PATH}/libexec/zed-editor|g" ~/.local/share/applications/dev.zed.Zed.desktop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment