MAJ
MAJ

Reputation: 497

Changing the username command in terminal in Mac

I am using terminal to try to run my code and I got it to run yesterday, but the username was tests-MacBook-Pro-2:sunkunoil maryjacketti$ and today it is tests-MacBook-Pro-2:~ maryjacketti$ and it won't run the code. The code is inside the folder sunkunoil on my computer. How do I get the terminal to say prompt the command like yesterday?

Upvotes: 0

Views: 3077

Answers (2)

serv-inc
serv-inc

Reputation: 38247

On a Mac, the paths are at different locations. For posterity, you can either change to a relative path

cd SOSim/sunkunoil

or an absolute path

cd /Users/maryjacketti/SOSim/sunkunoil

The first part is where you start out when you start the Terminal app. It is also called you HOME directory.

Upvotes: 0

Ryan Schaefer
Ryan Schaefer

Reputation: 3120

You have to change the directory that you are working in. This isn't an issue with the user that you are using, but rather where you are in the file system.

cd /desktop/sosim/sunkunoil
python [what ever your program name is]

The structure of terminal is:

[machine]: [current folder] [user]$

You are currently in home which is represented by ~.

Upvotes: 1

Related Questions