relopnutri.blogg.se

How to edit text file in terminal nano
How to edit text file in terminal nano







how to edit text file in terminal nano

You can move the cursor left, right, up down using the respective arrow keys. The interface of nano is quite straightforward. To edit it using nano, I would run the following command: nano demo-file.txtĪs you can see in the attached GIF, I opened 'demo-file.txt' in nano. Let's assume that I have a file named 'demo-file.txt' in my current directory. Running the nano command, along with a specified filename will open that particular file in the nano editor. The syntax to open a file to edit in nano is as follows: nano FILENAME Using the nano editorĪmong all the terminal based text editors I know, nano is the easiest to use for beginners. Replace 'FILENAME' with the name (or location) of your file. Nano is a terminal based text editor which is simple and easy to use. You can create a new file or open an existing one for editing in the Ubuntu command line like this: nano FILENAME Ubuntu being a beginner-friendly distribution comes preinstalled with a beginner-friendly text editor called Nano. There are several such text editors available for Linux. You have to edit files using command line text editors. Sounds scary, right? Unfortunately, you cannot avoid it. You don't have the comfort of the GUI here and you have to use the editor with keyboard shortcuts. Editing files is easy with a regular GUI text editor like Notepad, VS Code, etc.īut when you are stuck to the Linux terminal and have to edit files in the command line, things are not the same.









How to edit text file in terminal nano