Search This Blog

2024/11/04

Ubuntu:.Recover corrupt bashrc

Somehome you messed with .bashrc file & it
start mulfunctioning then you can just backup
and replace it with its working copy.
Usually .bashrc file located in /home/username (sangram is my username).
cd /home/sangram
Backup
cp .bashrc .bashrc_backup

Delete
rm -rf bashrc
First Way:
Now go for https://gist.github.com/marioBonales/1637696
which has default Ubuntu Bashrc file content.copy its
content and do

nano .bashrc

Then add copied content to it.Then

source .bashrc

Second Way:
copy the content of /etc/skel/.bashrc
and paste it into empty .bashrc

Now
source .bashrc


2024/11/02

Ubuntu:Disable Laptop Internal Keyboard

 

I am using Dell Laptop my laptop internal keyboard
acting weird insense it make sound from nowhere &
causing deleteting of folders & files abruptly without
me pressing any keyboard.
Also I observed that when I am typing in some document
it start deleting content,I try to replace it from technician
but still it behaves in same way.
I decided to disable it as I have bluetooth keyboard & mouse that
can do the treak.

Here is How you can disable laptop internal keyboard in Ubuntu,
same method should work whereever their is GRUB.

Edit /etc/default/grub
sudo nano /etc/default/grub

In this opened file look for
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Now replace this line with following line
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i8042.nokbd"

We need to regenerate grub.cfg so that our changes will take effect.
Run
update-grub2

Now you can reboot the laptop your Laptop Internal Keyboard will be disabled
You have not worry of your file & folders getting deleted abruptly & nor your
content of opened text in text editor will get deleted nor some weird keyboard
sound which tell some keyboard key is struck.