Linux by Ripudaman Singh
Customize the Bash [Linux]
Your terminal window generally has username@hostname but you can change that we will discuss here how to change it.
link for details:
Let's make the Example setup as in above picture with live time
cp ~/.bashrc ~/.bashrc.bak
In case of a problem it will help to get back the old file
nano ~/.bashrcAdd the follwing line at the LastPS1="\e[0;35m\w\e[m\n\@ \e[0;35m$\e[m "close the nano by ctrl X, Y enter.making Changes active bysource ~/.bashrc
To customize in your own way see the above links.
Get the localhost at some other name [Linux]
Open your terminal and type
sudo nano /etc/hosts
map your name with localhost address like
127.0.0.1 localhost
127.0.1.1 ripudaman
# The following lines are desirable for IPv6 capable hosts
::1
ctrl X, y enter
All done you can access the localhost at your describe name for me its ripudaman
(helpful when making twitter app which runs on localhost)
Getting port is already busy with PID [Linux]
Let's understand with an example, port 3000 is already busy with PID: 12513
solution one command
sudo kill -9 12513
SSH for Github [Linux]
1. Open Terminalssh-keygen -t rsa -b 4096 -C "your_email@example.com"
Fill all the details and required enter.2. It will add the public key for ssh in clipborad (below code)$ sudo apt-get install xclip # Downloads and installs xclip. If you don't have `apt-get`, you might need to use another installer (like `yum`) $ xclip -sel clip < ~/.ssh/id_rsa.pub # Copies the contents of the id_rsa.pub file to your clipboard
3. Upload key to githubGoto github --> setting --> sshand add title for keyand press ctrl +v in the ssh-key placeand saveand how get the url for ssh clone4. use command for clonne by ssh urlgit clone ssh-url-which-you-copied-from-github5. If any problem$ eval "$(ssh-agent -s)"> Agent pid 59566
ssh-add ~/.ssh/id_rsa
ssh -T git@github.com
..............................................................................................
Wait for more
Dual Boot Not getting Grub [Linux | Windows]
More problem stackoverflow
Comments
Post a Comment