Skip to main content


Showing posts from January, 2013

Secure nginx with Let's Encrypt on Ubuntu 18.04

VIM editor commands and examples - Linux

VIM An Advanced Text Editor:-

=> Newer Virsion of VI, the standard Unix text editor

=> gvim :         Graphical Version of vim


SPEED            : Do more with fewer keystrokes
Simplicity        : No dependence on mouse/GUI
Availability      : Included with most Unix-like OSes

Difficulty         : Stteper learning curve than simpler editors

Three Main Mode :-
Command Mode     : Move cursor, cut/paste text, change mode
Insert Mode            : Modify text
Ex Mode                 : Save, quit, etc

'Esc' key is used to exits current mode.

'EscEsc' always returns to command mode.

=> vim abc.txt        : can edit the text file if existing or not
=> vim /etc/passwd
=> vim /tmp/file


   : begins insert end of line
: Append to end of line
  : Insert at beginning of line
     (small)    o    insert new a line (below of current line)
     (caps)    O    insert new line ( above of current line )

EX MODE with ( : ) :-

:w       : wr…

Basic linux commands


- date: to see the date and time - date 112503451982 : month,date,hour,minut,year - cal: to see the calendar - cal 2010: to see the calendar of 2010 - cal 5 2010: display the calendar of May 2010 - clear: to clear the screen - ls: to see the list of dir and file - useradd vishal: to create user with name 'vishal' - passwd vishal: to set & also change password of user 'vishal' - passwd: to root only
- passwd -d vishal: create user without password - usermod -l n-name o-name: to rename user - usermod -g group user: to add user in group - useradd -n vishal: create user without duplicate directory - userdel vishal: to delet user - userdel -r vishal: Delet user with their directory - rm -rf directory: forcefuly remove directory
- groups vishal: to see membarship of user - vi /etc/passwd: see user directory - groupadd sels: create group