Hi I'm having difficulty installing exercism in Linux Ubuntu, specifically at the Bash part

Here are the steps I’ve taken

  1. cloned a new repository titled exercism
  2. placed the archive in the repository using VsCode
  3. ran tar -xf exercism-3.1.0-linux-x86_64.tar.gz
  4. created bin directory inside repository and ran bin/exercism
    at this point everything seemed to be running correctly
  5. Then ran the commands to check if bin was in PATH

at this point I’m getting back ~/bin is in PATH
but running exercism returns
exercism: is not a command

also when running source ~/.bash_profile
I’m getting `/root/.bash_profile’: not a valid identifier in return

Are you using sudo for some commands and not others? ~ expanding to /root suggests you might be setting up some things in the root home directory and others in your non root home directory.

1 Like

If you just created the bin directory now, maybe it was not added to your PATH. Try opening another terminal window and running exercism on the new window.

so Looking back I don’t believe I used sudo for any of the commands
the error -bash: export: `/root/.bash_profile’: not a valid identifier now pops up on the ubuntu terminal everytime I open it.

The bin directory I created was located inside my exercism repository, Was that correct? and how would that affect the PATH commands in the Bash section.

You should create the bin directory inside your home directory. Usually the initial configuration on Ubuntu looks for a ~/bin directory and adds it to the PATH if it exists.

you don’t need to use sudo or a terminal logged in as root.

Hmm, I’m not entirely clear at this point.
Whenever I open Ubuntu I believe that the terminal is always logged in as root
and opened up inside the root repository

So should I cd … out of the root repository and place it in the bin located there?
Or should I have created a bin repository in the root repository

Have you installed Ubuntu as a standalone operating system? Does the machine boot directly to it? Are you logging in from a GUI or from a terminal? More detail could help. You normally shouldn’t use the system logged in as root.

No my machine boots to windows, I use ubuntu on windows. Probably should have specified that in the title, could of saved some headache

So you’re probably using WSL. During installation (or when running it for the first time) it should have asked for a username and password to create a user. Otherwise you should create a user and log in using that user. Try to look for WSL documentation on installation.