modelsgre.blogg.se

Edit text file in terminal debian
Edit text file in terminal debian





Move your cursor to select text, and then press y to copy the selected text or x to cut it.

edit text file in terminal debian

Position the cursor at the left or right side of the text you want to copy and press the v key. You can select, copy, cut and paste text in command mode. There are a variety of other delete commands - for example, typing dd (press the d key twice) deletes an entire line of text. Press the x key to delete the character under the cursor.

edit text file in terminal debian

While in command mode, you can move the cursor around with the arrow keys. Trying to type at this screen will result in unexpected behavior. Vi is a modal text editor, and it opens in command mode. It looks like you can just start typing, but you can’t. This is what you’ll see when you open a file in vi. Use the su command instead if you’re using a non-Ubuntu version of Linux that doesn’t use sudo. So, for example, you’d type sudo vi /etc/fstab if you wanted to edit your fstab file. Remember to use sudo if you want to edit a system file.







Edit text file in terminal debian