vi editor on Linux


to create a text file or opens it
vim test

2 modes: insert(only inserts data),escape(press esc)–we can pass through and delete the content

to enter insert mode:
i — from same charactter of cursor pointed
a–from next character of right side from cursor
o(small oh) — new line created below cursor.
O(capital oh) — new line created above cursor.


to save file: come to escape mode and type :w
to quit write and quit, :wq
to quit wihtout saving changes :q!

In escape mode:
$ will move to end of line.
0(zero) — beginning of the line.
x — deletes a character.
nx — deletes n characters
dw — delete a word
ndw — delete n words
dd — delete the line
ndd — n lines
yy — yonking — copies a line where cursor is placed.
p -paste the copied line beneath the cursor.
similarly nyy — to copy multiple lines.




How do I change the font size in the Putty window?

Changing the default window font size and color

You can adjust a variety of windows attributes to meet your personal preferences. Once you have made any modifications, please remember to Save them.

You can increase/decrease the font size and type by

1) Open Putty
2) Select Appearance from the Window node on navigation tree in the in left hand panel.
3) Click the Change button in the Font settings section
4) Select your new font and size and click OK and save the session

Reference: NewArk

How to resolve ssh connectivity issue?

When we try to connect a Linux machine from another using SSH, we might get issue as connection refused.

Two reasons for this.

  1. Firewall is blocking
  2. SSH is not configured or installed.

I am taking the Ubuntu machines for this as an example.

Based on the situation, we need to run below commands on both the machines.

For the first case,

sudo ufw allow 22

For the second case,

To enable firewall.

sudo ufw enable

Below will update the OS first, then will install openssh-server and adding exception in firewall for port 22, which is used for ssh.

sudo apt-get update
sudo apt-get install openssh-server
sudo ufw allow 22

We can install openssh-client also.

sudo apt-get install openssh-client openssh-server

We can remove and install again if already installed.

sudo apt-get remove openssh-client openssh-server

Reference: AskUbuntu

GitHub Desktop Window issue

Sometimes, GitHub desktop window is not visible.

It will be showing as an icon on the task bar and we can even hover over it to see the preview. But we can’t use that window.

Normally it happens to the people who are using an extra monitor.

To fix this, delete the file :
C:\Users\<username>\AppData\Roaming\GitHub Desktop\window-state.json

Reference: GitHub

Blog at

Up ↑