Nano is a tool you can use to modify or create files within SSH. It is incredibly useful for editing existing files and offers a wide range of functionality.
Opening or creation of files:
[code description=""]n
When you have a file open using nano, there are commands that will assist you in finding, editing, or saving content. Below is a list of commands you can use when editing a file with nano to perform common operations:
To exit:
[code description=""]CTRL+x[/code]
To save after modification, exit with the above command and enter "y" when prompted.
To cancel any modification, exit with the above command and enter "n" when prompted.
If creating a new file, upon running the above command you will also be prompted for a file name. Enter the desired file name to create the file.
To cut a single line:
[code description=""]CTRL+k[/code]
To paste a line:
[code description=""]CTRL+u[/code]
To search for items:
[code description=""]CTRL+w[/code]
To save without exiting:
[code description=""]CTRL+o[/code]
Justify current selected paragraph:
[code description=""]CTRL+j[/code]
Insert a file into the currently selected one:
[code description=""]CTRL+r[/code]
Move to previous screen:
[code description=""]CTRL+y[/code]
Move to next screen:
[code description=""]CTRL + v[/code]
Display cursor:
[code description=""]CTRL+c[/code]
Invoke spell checker:
[code description=""]CTRL+t[/code]
For further commands that can be used when utilizing the nano utility, please use the following command to pull up a full list of features.
To pull up nano help page:
[code description=""]CTRL+g[/code]
Opening or creation of files:
[code description=""]nano /filedirectory/filename[/code]
Nano is a modeless editor, meaning once you have opened a file you can type to add text to it. There may be times when you need to turn off line wrap to ensure there are no formatting issues.
To disable wrapping on long text lines:
[code description=""]n
ano -w /filedirectory/filename
[/code]When you have a file open using nano, there are commands that will assist you in finding, editing, or saving content. Below is a list of commands you can use when editing a file with nano to perform common operations:
To exit:
[code description=""]CTRL+x[/code]
To save after modification, exit with the above command and enter "y" when prompted.
To cancel any modification, exit with the above command and enter "n" when prompted.
If creating a new file, upon running the above command you will also be prompted for a file name. Enter the desired file name to create the file.
To cut a single line:
[code description=""]CTRL+k[/code]
To paste a line:
[code description=""]CTRL+u[/code]
To search for items:
[code description=""]CTRL+w[/code]
To save without exiting:
[code description=""]CTRL+o[/code]
Justify current selected paragraph:
[code description=""]CTRL+j[/code]
Insert a file into the currently selected one:
[code description=""]CTRL+r[/code]
Move to previous screen:
[code description=""]CTRL+y[/code]
Move to next screen:
[code description=""]CTRL + v[/code]
Display cursor:
[code description=""]CTRL+c[/code]
Invoke spell checker:
[code description=""]CTRL+t[/code]
For further commands that can be used when utilizing the nano utility, please use the following command to pull up a full list of features.
To pull up nano help page:
[code description=""]CTRL+g[/code]