Okay, maybe I’m dumb and I’m missing a step here, but I have to reinstall flyctl every time I boot my terminal. I am using an Ubuntu shell on a Windows 11 machine.
WSL might not be persisting your PATH variable. Assuming you are using bash, try the following:
-
Install
flyctl
again -
Run:
which fly
- Replacing
<output of which fly goes here>
with the output ofwhich fly
, run:
echo 'export PATH=$PATH:<output of which fly goes here>' >> ~/.bashrc
If you install flyctl on WSL2 and flyctl is not already in your path, the output will contain some post install instructions. Here is what I get when I install on WSl2:
$ curl -L https://fly.io/install.sh | sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1475 0 1475 0 0 4483 0 --:--:-- --:--:-- --:--:-- 4469
######################################################################## 100.0%
set channel to shell
flyctl was installed successfully to /home/rubys/.fly/bin/flyctl
Manually add the directory to your $HOME/.bash_profile (or similar)
export FLYCTL_INSTALL="/home/rubys/.fly"
export PATH="$FLYCTL_INSTALL/bin:$PATH"
Run '/home/rubys/.fly/bin/flyctl --help' to get started
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.