Skip to content

Instantly share code, notes, and snippets.

@benstigsen
Created February 7, 2025 22:44
Show Gist options
  • Save benstigsen/12ca20adb1efc9c4b168cb8813421d02 to your computer and use it in GitHub Desktop.
Save benstigsen/12ca20adb1efc9c4b168cb8813421d02 to your computer and use it in GitHub Desktop.
Linux Discord installation script.
#!/bin/sh
if [ "$(id -u)" -ne 0 ]; then
echo 'run this script as root/sudo!'
exit
fi
rm discord.tar.gz || true
wget -O discord.tar.gz 'https://discord.com/api/download?platform=linux&format=tar.gz'
tar -xvzf discord.tar.gz
rm -rf /usr/share/discord || true
mv Discord /usr/share/discord
rm -f /usr/bin/discord || true
ln -s /usr/share/discord/Discord /usr/bin/discord
rm -f /usr/share/icons/discord.png || true
mv /usr/share/discord/discord.png /usr/share/icons/discord.png
rm -f /usr/share/applications/discord.desktop || true
ln -s /usr/share/discord/discord.desktop /usr/share/applications/discord.desktop
update-desktop-database
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment