You’ll be prompted for a filename to use, and the shortcuts at the bottom will change to reflect what you can enter to complete this particular command.If you want to insert the contents of another file into your current buffer, you’d type Ctrl+R.You can cancel both of the previous commands by typing Ctrl+C.You can hit Escape twice instead of holding down the Control key, if you have trouble doing that. The most common ones are listed at the bottom of the screen, but there are many more that aren’t. When you perform a command, the bottom two rows modify dynamically to fit the context of what you're doing. If you messed up, just hit Ctrl+^ again to unset the marker and you can start over.To copy the marked text, hit Meta+^. Note that nano does not use the Shift key in shortcuts. This meant that redistribution was somewhat of a fuzzy area, and so the TIP project was born. Nano will politely ask you if you want to save your buffer, and you can cancel this action as well.Now that we’ve got a hang of shortcuts, let’s get used to moving around a text file very quickly. Gary Newell was a freelance contributor, application developer, and software tester with 20+ years in IT, working on Linux, UNIX, and Windows.How to Edit Text Files Using the gEdit Linux Text Editor15 Linux Terminal Commands That Will Rock Your World20 Handy Raspberry Pi Terminal Commands for BeginnersHow to View the End of a File in Linux with the 'Tail' CommandEverything You Need to Know About the 'Domainname' Command Most Linux distributions include a text editor called nano as a standard utility. If, instead, you want to cut the text, hit Ctrl+K.To Paste your text, move the cursor to a suitable position and hit Ctrl+U.If you want to remove an entire line of text, simply hit Ctrl+K without highlighting anything. Want to move pages at a time instead? Though it is less complicated to use than the likes of Vim and Emacs, it doesn’t mean Nano cannot be overwhelming to use.. If it does not exist, it’ll start a new buffer with that filename in that directory.At the top, you’ll see the name of the program and version number, the name of the file you’re editing, and whether the file has been modified since it was last saved. Since line wrapping is set to “on” by default, this usually comes in handy in the opposite way; for example, you’re writing a config file and want to disable line-wrapping.You can see that the line the cursor is on has a “$” at both the beginning and end. To use nano as the default text editor, you need to change the VISUAL and EDITOR environment variables. This signifies that there’s more text both before and after the portion being displayed on screen.If you want to search for a text string, hit Ctrl+W, and enter your search term. You simply move the cursor to where you want to start marking, and then you hit Ctrl+^ to “set” it. Invoking nano without options and without a filename opens the editor full-screen within the terminal window. Of course, you can always use the Home, End, Page Up, Page Down, and the arrow keys to get around, but that requires moving your fingers from the letters that we all love so much.To move the cursor forward or backward, you can type Ctrl+F and Ctrl+B. And, if you’re really in a rush, you can hit Ctrl+_ and then type in the line number, a comma, and the column number to jump straight there.If you want to see where your cursor currently is, sort of like nano-GPS, hit Ctrl+C.When we want to copy text in graphical environment, we highlight it with the cursor. All shortcuts use lowercase letters and unmodified number keys, so Ctrl+G is NOT Ctrl+Shift+G.Hit Ctrl+G to bring up the Help documentation and scroll down to see a list of valid shortcuts.When you’re done looking at the list, hit Ctrl+X to exit help.Let’s say you’re working on a new text file, or “buffer,” and you want to save it. There are also some commands that require use of the Meta key. To cut and paste a particular line, first bring the cursor to that … For more information, check out the The strength of nano lies in its simplicity of use. Pico was the default text editor of Pine, an email program from back in the day that wasn’t distributed with a GPL-friendly license. To move up and down one line at a time, you can type Ctrl+P and Ctrl+N. Set Nano as the Default Text Editor # By default on most Linux systems, the default text editor for commands such as visudo and crontab is set to vi. It’s pretty simple, so type some text out, or copy something and paste it into your terminal so we have something to play with.Program functions are referred to as “shortcuts” in nano, such as saving, quitting, justifying, etc. You can toggle that feature in nano with the Meta+L shortcut. You can also mark backwards from your “set” point. On most keyboard layouts, Meta equates to the Alt button.When you want to quit nano, you just hit Ctrl+X.
Nano is installed by default in Ubuntu and many other Linux distros and works well in conjunction with sudo, which is why we love it so much.You can run nano in two ways. To move forward and backward one word at a time, you can use Ctrl+Space and Meta+Space (remember, that’s Alt+Space). . The shortcuts work just like in GUI-based word processors like Word and Open Office, so it’s just a matter of learning which ones do what. For example, when you save a buffer with the Instead, you get a plain window, the last two lines of which contain a list of the common tasks you can perform given the current state of the editor. GNU nano is a text editor for Unix-like computing systems or operating environments using a command line interface. This sometimes comes in handy when editing configuration files.You know how in notepad, you can force long lines of text to wrap-around into what look like paragraphs? Ctrl+V moves down a page, and Ctrl+Y moves up a page.But wait, there’s more! Nano is the default terminal-based text editor in Ubuntu and many other Linux distributions. If you have a new file that isn’t saved yet, you’ll see “New Buffer.” Next, you’ll see the contents of your document, a body of text. You won't find any special formatting options or font selections.