Skip to content

Instantly share code, notes, and snippets.

@weehong
Forked from abn/install-jetbrains-toolbox.sh
Last active July 5, 2025 10:15
Show Gist options
  • Save weehong/0bf6b75c54b56d5cbbc33752c93dac8b to your computer and use it in GitHub Desktop.
Save weehong/0bf6b75c54b56d5cbbc33752c93dac8b to your computer and use it in GitHub Desktop.
Install JetBrains Toolbox App with Dependency Check

Install JetBrains Toolbox App with Dependency Check

Reference and fork from, https://gist.github.com/abn/022c5f9eae491687a766f25bd8322fc0

How to use

Copy and paste the following command to your terminal

JetBrains Toolbox

bash -c "$(curl -fsSL https://gist.githubusercontent.com/weehong/0bf6b75c54b56d5cbbc33752c93dac8b/raw/f8bcdbcc8cfbb93909916e25ef1fe29fb966a0f3/install-jetbrains-toolbox.sh)"

Postman

bash -c "$(curl -fsSL  https://gist.githubusercontent.com/weehong/0bf6b75c54b56d5cbbc33752c93dac8b/raw/30c519a9b674be0e48269bc12531011d206e4129/postman.sh)"
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
# --- 0) Check/install dependencies ---
deps=(curl jq tar libfuse2)
for pkg in "${deps[@]}"; do
if [[ "$pkg" == "libfuse2" ]]; then
if ! dpkg -s libfuse2 &> /dev/null; then
read -rp "Package libfuse2 is missing. Install? [y/N] " ans
if [[ "$ans" =~ ^[Yy] ]]; then
sudo apt update
sudo apt install -y libfuse2
else
echo "libfuse2 is required. Exiting."
exit 1
fi
fi
else
if ! command -v "$pkg" &> /dev/null; then
read -rp "Command '$pkg' is missing. Install? [y/N] " ans
if [[ "$ans" =~ ^[Yy] ]]; then
sudo apt update
sudo apt install -y "$pkg"
else
echo "'$pkg' is required. Exiting."
exit 1
fi
fi
fi
done
# --- 1) Fetch the latest Toolbox URL for Linux ---
TOOLBOX_URL=$(
curl -fsSL 'https://data.services.jetbrains.com/products/releases?code=TBA&latest=true&type=release' \
-H 'Origin: https://www.jetbrains.com' \
-H 'Referer: https://www.jetbrains.com/toolbox/download/' \
| jq -r '.TBA[0].downloads.linux.link'
)
# --- 2) Define install directory ---
INSTALL_DIR="$HOME/.local/share/JetBrains/Toolbox"
# --- 3) Create the directory ---
mkdir -p "$INSTALL_DIR"
# --- 4) Download & extract in one go ---
curl -fsSL "$TOOLBOX_URL" \
| tar xz --strip-components=1 -C "$INSTALL_DIR"
# --- 5) (Optional) Symlink into ~/bin if it exists ---
if [[ -d "$HOME/bin" ]]; then
ln -sf "$INSTALL_DIR/jetbrains-toolbox" "$HOME/bin/jetbrains-toolbox"
fi
echo "JetBrains Toolbox installed to $INSTALL_DIR"
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
# --- 0) Check/install dependencies ---
deps=(curl jq tar libfuse2)
for pkg in "${deps[@]}"; do
if [[ "$pkg" == "libfuse2" ]]; then
if ! dpkg -s libfuse2 &> /dev/null; then
read -rp "Package libfuse2 is missing. Install? [y/N] " ans
if [[ "$ans" =~ ^[Yy] ]]; then
sudo apt update
sudo apt install -y libfuse2
else
echo "libfuse2 is required. Exiting."
exit 1
fi
fi
else
if ! command -v "$pkg" &> /dev/null; then
read -rp "Command '$pkg' is missing. Install? [y/N] " ans
if [[ "$ans" =~ ^[Yy] ]]; then
sudo apt update
sudo apt install -y "$pkg"
else
echo "'$pkg' is required. Exiting."
exit 1
fi
fi
fi
done
# --- 1) Define download URL and install directory ---
POSTMAN_URL="https://dl.pstmn.io/download/latest/linux_64"
INSTALL_DIR="$HOME/.local/share/Postman"
# --- 2) Create the installation directory ---
mkdir -p "$INSTALL_DIR"
# --- 3) Download and extract Postman ---
curl -fsSL "$POSTMAN_URL" \
| tar xz --strip-components=1 -C "$INSTALL_DIR"
# --- 4) (Optional) Symlink into ~/bin if it exists ---
if [[ -d "$HOME/bin" ]]; then
ln -sf "$INSTALL_DIR/Postman" "$HOME/bin/Postman"
fi
# --- 5) Create Desktop Entry in the applications folder ---
DESKTOP_FILE="$HOME/.local/share/applications/Postman.desktop"
cat > "$DESKTOP_FILE" <<EOF
[Desktop Entry]
Version=1.0
Name=Postman
Comment=API Development Environment
Exec=$INSTALL_DIR/Postman %U
Icon=$INSTALL_DIR/app/icons/icon_128x128.png
Terminal=false
Type=Application
Categories=Development;IDE;
EOF
chmod +x "$DESKTOP_FILE"
# --- 6) Confirm installation ---
echo "Postman installed to $INSTALL_DIR"
echo "Desktop entry created at $DESKTOP_FILE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment