Create new file nano linux
To create a new file using the nano
editor in Linux, you can follow these steps:
- Open a terminal window.
- Type the command
nano
followed by the name of the file you want to create, for example:nano mynewfile.txt
- Press Enter to create the file.
Alternatively, you can use the touch
command to create a new file, like this:
touch mynewfile.txt
Then, you can open the file in nano
using the command:
nano mynewfile.txt
Either way, nano
will open a new file with a blank slate, where you can start typing your content.
Note: If you want to create a file with a specific extension (e.g., .txt
, .cpp
, etc.), make sure to include the extension in the filename.