1

This question already has an answer here:

i've messed up the /etc/profile file and now i can't login to the rpi. Is there a way to edit this file on windows or linux ?

marked as duplicate by goldilocks May 7 '18 at 17:31

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0

Take the sd card and edit the file on another computer. That's the easiest way to go around it.

  • when i read the card from windows i cant see the file – Hbib May 7 '18 at 17:23
  • Are you able to see other files? Or none at all? You should end up seeing two partitions (I think) and you will have to "mount" the second partition from the sd card.... and that is "if" windows is able to mount ext3/ext4 (or whatever formatting) the partition has. I have no idea if that's possible with windows these days (would think it's still not possible, but won't assume.. it's been more than 15 years since I used windows semi-seriously so don't know the state of affairs for this). I'd say: try to mount it on a linux box. – eftshift0 May 7 '18 at 17:26
  • Just in case: not that you need to install linux on a computer to do this. If you are in extreme need, you could just use a live CD or live USB to boot on linux without touching a single bit from your windows installation on the computer. – eftshift0 May 7 '18 at 17:28
  • You do not need to install linux to read linux file systems. There is software available to access linux fs on windows. Just search how to access linux fs on windows on google @eftshift0 , Hbib. – scitronboy May 7 '18 at 19:45
  • I think it's clear enough from my comments, but just in case: In no way did I imply that linux has to be installed in order to be able to read/write from the sdcard. I said: 1 I don't know if it's possible to do it from windows. 2 In case of extreme need (For example, as in, "I don't have the time to sit down to download software from who knows where on internet in order to mount on windows and follow who knows how many instructions to get it done), it can be done by starting linux from a live Cd or live USB so that the windows installation doesn't get busted and i can move on with my life. – eftshift0 May 7 '18 at 19:56

Not the answer you're looking for? Browse other questions tagged or ask your own question.