Skip to content

Instantly share code, notes, and snippets.

@stknohg
Last active November 4, 2024 14:48
Show Gist options
  • Save stknohg/960d9108711d59ce6195ea8b3954fe72 to your computer and use it in GitHub Desktop.
Save stknohg/960d9108711d59ce6195ea8b3954fe72 to your computer and use it in GitHub Desktop.
Linux環境にNushellをインストールする手順
# Change default shell
echo '/usr/bin/nu' | sudo tee -a /etc/shells
chsh -s /usr/bin/nu
#!/usr/bin/env bash
# Download and install
NU_VERSION=$(curl -s https://api.github.com/repos/nushell/nushell/releases/latest | grep tag_name | awk '{print $2}' | sed -e 's/"//g' -e 's/,//g')
curl -LO https://github.com/nushell/nushell/releases/download/${NU_VERSION}/nu-${NU_VERSION}-x86_64-unknown-linux-gnu.tar.gz
sudo mkdir -p /opt/nushell/${NU_VERSION}/
sudo tar xzvf nu-${NU_VERSION}-x86_64-unknown-linux-gnu.tar.gz -C /opt/nushell/${NU_VERSION}/ --strip-components 1
rm -f ./nu-${NU_VERSION}-x86_64-unknown-linux-gnu.tar.gz
# Set symbolic link
sudo ln -sf /opt/nushell/${NU_VERSION}/nu /usr/bin/nu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment