SOLVED TErminal prompt never references my repo

c3PanoH

Member
Apr 16, 2020
10
1
3
UK
cPanel Access Level
Root Administrator
My repo was setup using cPanel Git™ Version Control. Problem (though minor) - the cPanel Terminal prompt always starts one level higher than the actual repo.
When i was setting up the repo it asked me where i should set the repo and i specified 'public_html' where it can correctly be seen with the path:
Code:
/home/myusername/public_html/
However whenever i start terminal it always opens in:
Code:
/home/myusername/
so I'm constantly 'cd'-ing (changing directory) into 'public_html' - its probably
simple but i dont know how to permanently change terminal to start in 'public_html' the repo index repo.
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
15,285
2,434
363
cPanel Access Level
Root Administrator
Hey there! While there isn't a setting in cPanel to control this, you could add the following line to the end of the /home/username/.bashrc file, as this gets run each time the user logs in:

Code:
cd /home/username/public_html
That will tell Bash to cd you into the public_html directory each time the user is logged in.

Let me know if that works for you!
 

c3PanoH

Member
Apr 16, 2020
10
1
3
UK
cPanel Access Level
Root Administrator
Hi cPRex,
That did the trick!, i thank you - still learning bash commands so this one is right at the top of my list; its the obvious ones that fool you sometimes.

thank you