# Getting flyctl: command not found error post install

**URL:** <https://community.fly.io/t/getting-flyctl-command-not-found-error-post-install/4954>\
**Category:** Questions / Help\
**Created:** [April 30, 2022, 4:59am UTC](https://community.fly.io/t/getting-flyctl-command-not-found-error-post-install/4954 "2022-04-30T04:59:16Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![cerosilva](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/cerosilva/32/3330_2.png) [@cerosilva](https://community.fly.io/u/cerosilva)\
**Post date:** [April 30, 2022, 4:59am UTC](https://community.fly.io/t/getting-flyctl-command-not-found-error-post-install/4954/1 "2022-04-30T04:59:16Z")

</div>

Hi,

I’ve just installed FLYCTL on my linux system and when i try to sign up using flyctl auth signup, I get  
lyctl: command not found.

Is there any additional step i need to follow?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![greg](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/greg/32/2119_2.png) [@greg](https://community.fly.io/u/greg)\
**Post date:** [April 30, 2022, 3:23pm UTC](https://community.fly.io/t/getting-flyctl-command-not-found-error-post-install/4954/2 "2022-04-30T15:23:13Z")

</div>

Did you use the recommended install script?

> **[Install flyctl](https://fly.io/docs/hands-on/install-flyctl/)**
>
> Documentation and guides from the team at Fly.io.

Only you can take a look at the `https://fly.io/install.sh` that runs and can see at the bottom that should try and add it to the PATH so that you can just type `flyctl` (or `fly`) without any prefix (like `/usr/bin/flyctl` or `/usr/local/bin/flyctl`.

So … either it has not been installed _or_ it has been installed, but it has not been added to the PATH and so can’t be run with just `flyctl`. Maybe take a look at the `/bin` folders and see if it’s there?

---

<div class="post-metadata">

**Author:** ![victor-barh](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/victor-barh/32/36209_2.png) [@victor-barh](https://community.fly.io/u/victor-barh)\
**Post date:** [August 23, 2022, 6:14pm UTC](https://community.fly.io/t/getting-flyctl-command-not-found-error-post-install/4954/3 "2022-08-23T18:14:27Z")

</div>

Hi @greg I have the same problem. I’ve tried all way to fix that but i couldn’t succeed. can you please help me !

---

<div class="post-metadata">

**Author:** ![eli](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/eli/32/49867_2.png) [@eli](https://community.fly.io/u/eli)\
**Post date:** [August 23, 2022, 6:48pm UTC](https://community.fly.io/t/getting-flyctl-command-not-found-error-post-install/4954/4 "2022-08-23T18:48:26Z")

</div>

hi! If you’re getting a “`flyctl: command not found error`”, then you probably just need to configure your shell to add your fly install to your $PATH for all new shells you start with whichever terminal app you’re using.

How to do this will depend on what shell you’re using, since you’d use a different config file with each one.

What happens when you run the following?

```auto
cd ~ ; pwd
.fly/bin/flyctl version

```

---

<div class="post-metadata">

**Author:** ![greg](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/greg/32/2119_2.png) [@greg](https://community.fly.io/u/greg)\
**Post date:** [August 23, 2022, 6:50pm UTC](https://community.fly.io/t/getting-flyctl-command-not-found-error-post-install/4954/5 "2022-08-23T18:50:15Z")

</div>

Hi @victor-barh : no need for me, @eli is on the case 🙂 Check ⬆

---

<div class="post-metadata">

**Author:** ![victor-barh](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/victor-barh/32/36209_2.png) [@victor-barh](https://community.fly.io/u/victor-barh)\
**Post date:** [August 24, 2022, 7:24am UTC](https://community.fly.io/t/getting-flyctl-command-not-found-error-post-install/4954/6 "2022-08-24T07:24:58Z")

</div>

I’m getting thisflyctl v0.0.381 linux/amd64 Commit: ed6bc2a6 BuildDate: 2022-08-23T14:17:58Z. so how can i add it to my PATH

---

<div class="post-metadata">

**Author:** ![eli](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/eli/32/49867_2.png) [@eli](https://community.fly.io/u/eli)\
**Post date:** [August 24, 2022, 2:29pm UTC](https://community.fly.io/t/getting-flyctl-command-not-found-error-post-install/4954/7 "2022-08-24T14:29:35Z")

</div>

You’ll need to figure out what shell you’re using on your local machine. For most desktop Linux users, this will be bash by default:

That said, it may vary depending on your distro or setup. Running `echo $SHELL` will let you know what shell you’re running. If it’s not bash, check that project’s documentation website for specific instructions.

If you are running bash, then you can add flyctl to your path by running the following:

**NOTE 1** : make sure you replace `"<your-user>"` with the name of your actual user (to double-check this, make sure it matches the output of `whoami` )

```auto
export FLYCTL_INSTALL="/<your-username>/.fly"
export PATH="$FLYCTL_INSTALL/bin:$PATH"

```

Then you’ll want to open your `~/.bashrc` file [see note 2] file your favorite text editor, append the above two lines to it and save. Finally, it’s convenient to tell your enviroment you want to make this the default for new shells:

```auto
source ~/.bashrc 

```

**NOTE 2:** there are other places where you can configure bash behavior. In this case we configured the current user’s bash to know where to find `flyctl`.

It’s not necessary knowledge to use `fly`, but knowing all the configuration options for your shell is worthwhile if you’re planning on spending much time there. Here’s [a good overview of all the different ways bash can be configured](https://wiki.archlinux.org/title/Bash#Configuration_files)

If you prefer more of a zine/blog-style resource, and want to learn bash specifically as a newer Linux user, I’ve yet to see a better resource than [Bite Size Bash](https://wizardzines.com/zines/bite-size-bash/) 😄

---

<div class="post-metadata">

**Author:** ![tooongs](https://avatars.discourse-cdn.com/v4/letter/t/278dde/32.png) [@tooongs](https://community.fly.io/u/tooongs)\
**Post date:** [August 27, 2022, 5:07am UTC](https://community.fly.io/t/getting-flyctl-command-not-found-error-post-install/4954/8 "2022-08-27T05:07:31Z")

</div>

Hi, I’m receiving the same error and I ran that command gives me this:

.fly/bin/flyctl version  
/home/tongs  
flyctl v0.0.383 linux/amd64 Commit: 16a17b20 BuildDate: 2022-08-25T22:18:50Z

---

<div class="post-metadata">

**Author:** ![eli](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/eli/32/49867_2.png) [@eli](https://community.fly.io/u/eli)\
**Post date:** [August 27, 2022, 10:45pm UTC](https://community.fly.io/t/getting-flyctl-command-not-found-error-post-install/4954/9 "2022-08-27T22:45:27Z")

</div>

In that case, you’ll probably want to go through the above listed steps-- adding flyctl to your $PATH will let you use the flyctl command without having to specify where it is every time. Have you tried [the steps outlined above](https://community.fly.io/t/ssh-to-machine/6545/3) yet? If so, what what the result?

---

<div class="post-metadata">

**Author:** ![BackedUpBooty](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/backedupbooty/32/17592_2.png) [@BackedUpBooty](https://community.fly.io/u/BackedUpBooty)\
**Post date:** [September 1, 2022, 3:07pm UTC](https://community.fly.io/t/getting-flyctl-command-not-found-error-post-install/4954/10 "2022-09-01T15:07:34Z")

</div>

Hi there, jumping in as I had the same error. In fact when I ran the install.sh script it actually gave me the following output which supports what you’ve been advising:

```auto
flyctl was installed successfully to /var/services/homes/[USERNAME]/.fly/bin/flyctl
Manually add the directory to your $HOME/.bash_profile (or similar)
  export FLYCTL_INSTALL="/var/services/homes/[USERNAME]/.fly"
  export PATH="$FLYCTL_INSTALL/bin:$PATH"
Run '/var/services/homes/[USERNAME]/.fly/bin/flyctl --help' to get started

```

I ran both `export` lines and added both to my `.bashrc` file, can confirm this works, thanks for the advice.

---

<div class="post-metadata">

**Author:** ![ddiazepam](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/ddiazepam/32/7617_2.png) [@ddiazepam](https://community.fly.io/u/ddiazepam)\
**Post date:** [December 5, 2022, 1:47pm UTC](https://community.fly.io/t/getting-flyctl-command-not-found-error-post-install/4954/11 "2022-12-05T13:47:06Z")

</div>

In case anyone has this error on windows this is solution:

```auto
$env:Path += ';C:\Users\[USERNAME]\.fly\bin' 

```

Just run it in powershell

Edit: it works… until terminal reboot. Any persistent solution?

---

<div class="post-metadata">

**Author:** ![b-capra](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/b-capra/32/8146_2.png) [@b-capra](https://community.fly.io/u/b-capra)\
**Post date:** [December 27, 2022, 7:26pm UTC](https://community.fly.io/t/getting-flyctl-command-not-found-error-post-install/4954/12 "2022-12-27T19:26:49Z")

</div>

Hi eli,

I’m having an identical error, but the steps you’ve mentioned haven’t fixed it. Flyctl has been successfully installed, as verified by running .fly/bin/flyctl version in the home directory and getting back ‘flyctl v0.0.441 linux/amd64 …’, and have run both of the export commands (both in the home directory and in the .fly/bin directory) and added them both to my .bashrc file, yet I still cannot use the flyctl tool from the home directory without using /.fly/bin first. Any ideas why this might be happening?

Thanks.

---

<div class="post-metadata">

**Author:** ![eli](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/eli/32/49867_2.png) [@eli](https://community.fly.io/u/eli)\
**Post date:** [December 27, 2022, 7:54pm UTC](https://community.fly.io/t/getting-flyctl-command-not-found-error-post-install/4954/13 "2022-12-27T19:54:01Z")

</div>

It’s hard to say off the bat, but if you’re having trouble with this, I’d recommend making sure that the changes to ~/.bashrc and/or the local exports are present in the current shell by running

```auto
echo $FLYCTL_INSTALL
echo $PATH

```

Basically, you’ll want to make sure that the $FLYCTL\_INSTALL settings are somewhere in your $PATH so that bash knows where to find it. How that’s configured to happen can vary quite a bit depending on your local setup.

It’s possible that something else in your setup is overwriting the changes we’re trying to make to the $PATH, or that these changes aren’t making it to the shell session that you’re using to run flyctl commands. For example, this will (and does 😅 ) happen if you used a different, newer terminal window to make these changes.

---

<div class="post-metadata">

**Author:** ![barretogustavo](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/barretogustavo/32/9181_2.png) [@barretogustavo](https://community.fly.io/u/barretogustavo)\
**Post date:** [February 2, 2023, 5:12pm UTC](https://community.fly.io/t/getting-flyctl-command-not-found-error-post-install/4954/14 "2023-02-02T17:12:29Z")

</div>

If you tried all possibilities and it didn’t work, just run `.fly/bin/flyctl <your_fly_command>` . This will serve as an alternative to the `fly` and `flyctl` commands

---

<div class="post-metadata">

**Author:** ![jamescln](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/jamescln/32/11361_2.png) [@jamescln](https://community.fly.io/u/jamescln)\
**Post date:** [February 3, 2023, 11:49am UTC](https://community.fly.io/t/getting-flyctl-command-not-found-error-post-install/4954/15 "2023-02-03T11:49:30Z")

</div>

I was having the same issue and followed the advice above but it still wasn’t working 😔 adding the following to the end of the ~/.bashrc file fixed the problem though:

```auto
export FLYCTL_INSTALL="/home/<your-username>/.fly"
export PATH="$FLYCTL_INSTALL/bin:$PATH"

```

It’s only a small change but it seems to have done the trick for me!

---

<div class="post-metadata">

**Author:** ![Jeff](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/jeff/32/10574_2.png) [@Jeff](https://community.fly.io/u/Jeff)\
**Post date:** [March 18, 2023, 4:38pm UTC](https://community.fly.io/t/getting-flyctl-command-not-found-error-post-install/4954/17 "2023-03-18T16:38:44Z")

</div>

Can anyone share a working specs to install and use flyctl on windows?

---

<div class="post-metadata">

**Author:** ![rubys](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/rubys/32/16907_2.png) [@rubys](https://community.fly.io/u/rubys)\
**Post date:** [March 18, 2023, 4:40pm UTC](https://community.fly.io/t/getting-flyctl-command-not-found-error-post-install/4954/18 "2023-03-18T16:40:09Z")

</div>

This worked for me: [Install flyctl · Fly Docs](https://fly.io/docs/hands-on/install-flyctl/#windows)

---

<div class="post-metadata">

**Author:** ![Jeff](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/jeff/32/10574_2.png) [@Jeff](https://community.fly.io/u/Jeff)\
**Post date:** [March 18, 2023, 4:43pm UTC](https://community.fly.io/t/getting-flyctl-command-not-found-error-post-install/4954/19 "2023-03-18T16:43:06Z")

</div>

Thanks for reply! I installed it, loged in, added PATH, but still get this error:

 ![image](https://global.discourse-cdn.com/fly1/original/3X/9/1/91622933e0b8705e159d8dd99b76a999e70436bf.png)

---

<div class="post-metadata">

**Author:** ![Jeff](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/jeff/32/10574_2.png) [@Jeff](https://community.fly.io/u/Jeff)\
**Post date:** [March 18, 2023, 4:52pm UTC](https://community.fly.io/t/getting-flyctl-command-not-found-error-post-install/4954/20 "2023-03-18T16:52:17Z")

</div>

It appeared I just needed to reload vs code 🤬

---

<div class="post-metadata">

**Author:** ![rubys](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/rubys/32/16907_2.png) [@rubys](https://community.fly.io/u/rubys)\
**Post date:** [March 18, 2023, 4:52pm UTC](https://community.fly.io/t/getting-flyctl-command-not-found-error-post-install/4954/21 "2023-03-18T16:52:29Z")

</div>

![image](https://global.discourse-cdn.com/fly1/original/3X/6/2/62dd2d5a1f91d968f8cccc62cb9ee614e0c2f089.png)

This is what I’m seeing. Note `C:\Users\rubys\.fly\bin` in my path.

If you are open to recommendations, I strongly encourage WSL2. It plus Windows Terminal and VSCode are an awesome combination.

[Next page](https://community.fly.io/t/getting-flyctl-command-not-found-error-post-install/4954.md?page=2)
