DEV Community

Brent Vanwildemeersch
Brent Vanwildemeersch

Posted on

1

Bun command not found on Linux

After a clean install of bun on Linux, the bun command will not be recognised by the commandline, because bun was not automatically added to PATH

It will probably return a message as following,

bun --version

Command 'bun' not found, did you mean:

  command 'ben' from deb ben (0.9.0ubuntu2)
  command 'bus' from deb atm-tools (1:2.5.1-4)
  command 'zun' from deb python3-zunclient (4.0.0-0ubuntu1)

Try: sudo apt install <deb name>
Enter fullscreen mode Exit fullscreen mode

You can solve this with the following actions :

1. Edit the .bashrc file

nano nano ~/.bashrc 
Enter fullscreen mode Exit fullscreen mode

2. Add the following lines at the end of your .bashrc file

BUN_INSTALL="/home/{USERNAME}/.bun"
PATH="$BUN_INSTALL/bin:$PATH"
Enter fullscreen mode Exit fullscreen mode

with {USERNAME} replaced by your username.

3. Close your terminal and open a new shell

bun --version
Enter fullscreen mode Exit fullscreen mode

should now return information on the installed version of bun

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more