nano Command in Linux

In this blog we will learn about nano command .nano is a small and friendly text editor and beside the text editing nano offers many extra features like an interactive search or replace and it also has some other features like go-to line or column number it can give you the indentation in the file or some other features.First of all lets open our terminal , We can press ctrl+alt+ t to do this .

1.First of all nano can be used for creating a new file also so just write nano and then you just need to write the name of your file .Command : $nano file_name .

after pressing enter :

You ca write something here and then save it using $ ctrl+o .

after writing and pressing ctrl+o

Now you just need to press ENTER and it’s going to save the content of the file . You can press $ctrl+x to go out .

2.Once again once the file is created then we can add content of the file by the same command nano and the file name . $nano file_name .

3.In normal editors we have ctrl+x for cutting and ctrl +v for pasting but in nano editor we have $ctrl+k for cutting a line then $ctrl+u for uncut a line i.e you can paste your previous cut line.

4.Now we want to createa C++ file so we will just press nano and say abc.cpp . For c++file cpp is the extension of c++ file .And you can write your content inside the file .

nano is beneficial to use whenever yo uwant to add it some kind of code .

so this is how you can use nano command .

Partner Sites

Be the first to comment

Leave a Reply

Your email address will not be published.