.bashrc a: find b: mount c set permissions d edit and remove

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read this

.bashrc a: find b: mount c set permissions d edit and remove

Postby chinagreen on Fri Jan 01, 2010 7:24 pm

Last nite I was trying to set a path . This resulted in fouling up my Linux Mint 8 install. I would like to edit the bashrc file using the start up cd of Linux Mint.

Here are my questions:
1. How do I locate the root version of bash rc?
2. Once I have located it, how do I mount the hard drive and set permissions in order to edit the file?
3. In addition to editing the bash rc file inside root, I also copied the same file to the home directory. How do I find this file and delete it?

I'd like to accomplish 1-3 above at the terminal. I am not familiar with the commands to perform these activities.
Thanks,
Bill
chinagreen
Level 1
Level 1
 
Posts: 8
Joined: Fri Jan 01, 2010 7:08 pm

Linux Mint is funded by ads and donations.
 

Re: .bashrc a: find b: mount c set permissions d edit and remove

Postby viking777 on Sat Jan 02, 2010 11:44 am

2)Easiest way is to click on the 'Computer' icon on the desktop then click on the file for your Mint 8 install in the file manager then make a note of the file path to your mint8 installation. I will assume that this is /mnt/mint8 but it will certainly not be so it is up to you to substitute the correct start to the path in all the following commands - do not copy and paste - it won't work.

1) In a normal install the path would be /root/.bashrc but as you are using a live cd it would be something like /mnt/mint8/root/.bashrc


3)
Code: Select all
sudo gedit /mnt/mint8/root/.bashrc

to edit and

Code: Select all
sudo rm /mnt/mint8/~/.bashrc


to remove the one from your home directory. NB in the second command there the character before the /.bashrc is meant to be a tilde (the wavy line situated above # on a UK keyboard). I mention that because it doesn't look like one on my preview).

One word of warning though. In the second command I am assuming that you overwrote your existing .bashrc in home with the one from the root directory. If you didn't do that and there are two there then you had better sort out which one you want to delete first.


Code: Select all
ls -a /mnt/mint8/~/ | grep bash



Would check if there is more than one version.
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 14
Level 14
 
Posts: 5153
Joined: Mon Dec 01, 2008 11:21 am

Re: .bashrc a: find b: mount c set permissions d edit and remove

Postby chinagreen on Sat Jan 02, 2010 11:30 pm

Thanks for the help. I tried your suggestions. However, I was unsuccessful. My attempt can be found below.

Now, I have reinstalled Linux Mint.


mint@mint / $ sudo fdisk -l

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xf8000000

Device Boot Start End Blocks Id System
/dev/sda1 1 10 80293+ de Dell Utility
/dev/sda2 * 11 40 240975 83 Linux
/dev/sda3 41 9729 77826892+ 5 Extended
/dev/sda5 41 601 4506201 82 Linux swap / Solaris
/dev/sda6 602 5083 36001633+ 83 Linux
/dev/sda7 5084 9729 37318963+ 83 Linux
mint@mint / $ sudo mkdir /media/sda6/
mint@mint / $ sudo mount /dev/sda6 /media/sda6
mint@mint / $ cd /media/sda6/etc
mint@mint /media/sda6/etc $ sudo gedit bash.bashrc
chinagreen
Level 1
Level 1
 
Posts: 8
Joined: Fri Jan 01, 2010 7:08 pm

Re: .bashrc a: find b: mount c set permissions d edit and remove

Postby viking777 on Sun Jan 03, 2010 5:12 am

Well I am glad you got it sorted.

Just for future reference are you aware that .bashrc - as mentioned in the thread title, and bash.bashrc as mentioned in your last post, are two different files in two different locations?

This may have caused some confusion, I assumed you were talking about the first as that was in the thread title.
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 14
Level 14
 
Posts: 5153
Joined: Mon Dec 01, 2008 11:21 am

Re: .bashrc a: find b: mount c set permissions d edit and remove

Postby chinagreen on Mon Jan 04, 2010 7:02 pm

Yes. You are correct. I was confused about the bashrc file. Thought I had it in memory, but I didn't.
chinagreen
Level 1
Level 1
 
Posts: 8
Joined: Fri Jan 01, 2010 7:08 pm


Return to Installation & Boot

Who is online

Users browsing this forum: monkeyboy and 13 guests