Can't cd into etc/profile, "not a directory"

I am new to Ubuntu (or any Linux distro) and I encountered a problem where I cannot cd into etc/profile. I was trying to edit the bashrc so that I could change the colours in my terminal window.

I tried to ls inside the /etc/ file, and I see that there is a profile file there; but I can't enter it.

1

2 Answers

The reason why this fails is because /etc/profile is not a directory (unless you meant /etc/profile.d, but I don't think you did)

Instead use gedit ~/.profile
If you want to edit .bashrc: gedit .bashrc

By default /etc/profile is not a folder but a file so you can't cd into it.

The global bashrc file is /etc/bash.bashrc

5

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like