Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 20149  / 1 Year ago, fri, february 3, 2023, 11:49:57

When I do



vim .bashrc 


and try to edit the file it gives following error.



Can't open linked file for editing


When I do



ls -la 


it shows



.bashrc -> /home/likewise-open/company/user/dotfiles/.bashrc


When I try to cd into dotfiles, it says directory does not exist.



Please help.


More From » 14.04

 Answers
6

It seems your .bashrc is just a link to some other place .bashrc -> /home/likewise-open/company/user/dotfiles/.bashrc.



This is not a normal attitude, so instead of using sudo or whatever you have to bring it back to its normal place.



sudo cp /home/likewise-open/company/user/dotfiles/.bashrc ~


Then now change ownership if it's not owned by you:



sudo chown your-username:your-username ~/.bashrc


Now ensure it has the correct permissions:



chmod 644 ~/.bashrc


But since you say this:




When I try to cd into dotfiles, it says directory does not exist.




This means the /home/likewise-open/company/user/dotfiles/.bashrc file is not founded and had been deleted, so for that you get the message:




Can't open linked file for editing




This means the link is point to non existing file thus a broken link.



So you get a default bashrc file from /etc/skell



cp /etc/skel/.bashrc ~/

[#19578] Saturday, February 4, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
damomnning

Total Points: 422
Total Questions: 90
Total Answers: 106

Location: Mali
Member since Thu, Aug 13, 2020
4 Years ago
damomnning questions
;