how to use text editor in linux using nano command | Pro Tech guides

how to use text editor in linux using nano command

nano is a small and friendly text editor in linux. It allows you to edit text, find and replace text, cut, copy, paste in your terminal.

Text editor in Linux | using nano command | with options and examples

text editor in linux terminal
nano command

Hello, guys welcome to the next session on Linux command line tutorial. In this session, we will see how we can use "nano command" in Linux.

"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 show or it can give you the indentation in the file or some other features.

So let's see how we can use it.

Create a file and modify using nano

create a file using nano command
Interface of nano

$namo file name

I want to create a new file. So just write "nano" and then you just need to write the name of your file.

For example "nano file.txt" and press ENTER.

And then this is going to open this file and create this file in the terminal.

Save the file in nano

save the file in linux using nano

press ctrl + o

Now you may observe here that the file is open but it's not shown because we haven't saved the file.

So "nano" has created a file for us but we need to save it. In order to see it on your directory.

For example, I write some content in this file. Now in order to save this text inside this "file.txt" what you need to do is you need to press "ctrl + o"

"ctrl + o" it means to write out that means writing out to the file.

When you press "ctrl + o" and this will give you a kind of information.

Which says, filename to write "file.txt".

You just need to press ENTER and it's going to save the content of the file.


open the file using cat command
open the file

And when I open it is going to show the content of the file. Which we have inserted using "nano".

options in nano command

"nano" has some other controls like,

"Ctrl + g" - will get the help.

"Ctrl + x" - exit from the Nano command.

"Ctrl + k" - cut.

"Ctrl + u" - past.

"Ctrl + \" - replace a word.

"Ctrl + w" - find a word.

Conclusion

So "nano" can be used to create a different kind of files.

"nano" is good for editing some files which contain some code.

And it will do the highlighting or code highlighting for you. That's why "nano" is beneficial to use.

I hope you've enjoyed this tutorial please rate comment and bye for now.

HAVE A NICE DAY

Name

Apps,3,Games,1,Linux,38,Linux Commands,37,Network-Devices,1,Networking,1,Terminal Apps,2,Termux,17,Userland,3,Windows,1,
ltr
item
Pro Tech guides: how to use text editor in linux using nano command
how to use text editor in linux using nano command
nano is a small and friendly text editor in linux. It allows you to edit text, find and replace text, cut, copy, paste in your terminal.
https://1.bp.blogspot.com/-5lrKa7nMQ6A/X9H_nFnYGxI/AAAAAAAACpA/iu8YQ08Z168XR_LsD0845X7NE9jflVh-gCNcBGAsYHQ/s16000/nano-command-in-linux.png
https://1.bp.blogspot.com/-5lrKa7nMQ6A/X9H_nFnYGxI/AAAAAAAACpA/iu8YQ08Z168XR_LsD0845X7NE9jflVh-gCNcBGAsYHQ/s72-c/nano-command-in-linux.png
Pro Tech guides
http://www.protechguidez.com/2020/12/how-to-use-text-editor-in-linux-using-nano-command.html
http://www.protechguidez.com/
http://www.protechguidez.com/
http://www.protechguidez.com/2020/12/how-to-use-text-editor-in-linux-using-nano-command.html
true
7053638852026728047
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content