Which is used to copy a line in Vi editor?
Note
Copy the Line in Vi: "Press yy"
This command yanks (copies) the entire line where the cursor is located. 'yy' stands for 'yank line'. The first y tells Vi that you want to yank (copy), and the second 'y' specifies that you want to yank the entire line.
- 'cc' is used to change (delete and enter insert mode) the current line.
- 'cp' is not a valid Vi command for copying lines.
- ':copy' is not typically used for copying lines in the context of normal Vi usage.