Skip to main content

Vim Text editor and Nano editor|How to use vim & nano editors in Linux|Linux commands for devops

 Vim Text editor and Nano editor|How to use vim & nano editors in Linux|Linux commands for devops


There are 3 modes of VI Editor 1. Command Mode In command mode we cannot edit/input the text into the file/editor. To enter into command mode we need use [ESC] key. by default 2. Input Mode Input mode any key press will be taken as an input and will writes on to the file To enter into input mode you should press [i] key on the keyboard 3. Exit Mode In this we are going to quit from the editor. First we should be back to command mode by [ESC] and should type :q [quit] I=insert contents from the begining of the line i=insert contents from the current cursor position R=Replace characters from current cusor position S=replace single character O = open a new line above the current line o = open a new line below the current line write and save :wq quit without saving :q! quit :q undo :u move cursor to the begining of previous word :b yy = yank (copy the line) 2yy = copy 2 lines p = paste x=delete a character dw=delete a word dd=delete line 2dd=delete 2 lines



Comments

Popular posts from this blog

Linux User Management Commands 2020|how to create user in Linux|switch user|add user|view user

  Linux User Management Commands 2020|how to create user in Linux|switch user|add user|view user User Management in Linux Two types of users in linux: --------------------------------------------------- 1.Root User 2.Normal User 1. Root User = There is only one root user for a Linux System and its created by default The root user has total control of the Linux System like 1. Managing all the system resources 2. File Management 3. User Management 4. Network Configurations 5. System Configurations &Software Installations 2. Normal User = Any other user added by the ROOT will becomes Normal User. They has access to his home directory only. To enter root ----------------------- sudo su - (or) sudo su root To add user --------------------- adduser username To view user ---------------------- id username switch user ----------------------- suso su username switch user via gui ----------------------- super user ------------------- sudo su - To see how many u...

Linux cmp and diff commands|Linux commands for devops |difference between cmp and diff

Linux cmp and diff commands|Linux commands for devops |difference between cmp and diff CMP = command is used for comparing the byte by byte of text information of a file and outputs the first difference of the file. cat list1.txt green blue yellow white cat list2.txt green blue black white cmp list1.txt list2.txt output:- list1.txt list2.txt differ: byte 6, line 2 ------------------------------------------------------------------------------------------------------------------------------------- diff = it is used for comparting two text files and displays all the mis-matches in the files. In addition it displays special symbols helping us in understanding what we should do to make those two files identical. a = add c = change the text of the file d = delete line In addition to this it displays the mis-match lines with notation. = indicates the right side file = indicates suggestion should be applied to left side file 2,5c3 =in the left file from 2 - 5 lines should be replaced ...

How to Install Cursor AI Code Editor on Windows 11 (Step-by-Step Guide 2026)

 Cursor AI Code Editor Learn how to install and set up Cursor AI Code Editor on Windows 11 with this complete step-by-step guide. Whether you're a beginner or an experienced developer, this tutorial will help you get started quickly with Cursor AI. In this guide, you will learn: How to download Cursor AI editor Step-by-step installation process on Windows 11 Initial setup and configuration Tips to start coding with AI assistance  I have also created a detailed video tutorial—watch it here: https://youtu.be/thYBfc-engE?si=UMla-QcAmbIHhECN Cursor AI is a powerful AI-based code editor that helps developers write, debug, and optimize code faster using advanced AI features.