• Important: We recently upgraded our forum software - please let us know if you run into any issues.

Why is Terminal automatically entering my command after pasting? How can i solve this problem?



Kryptoghost

New Member
Looks like you might be copying a return or another line when you copy. This might help though.

Code:
Prior to pasting type a # then paste your line. It will not execute and you can remove the # and hit enter when the modifications have been completed.
 

AjayThakur3

New Member
Looks like you might be copying a return or another line when you copy. This might help though.

Code:
Prior to pasting type a # then paste your line. It will not execute and you can remove the # and hit enter when the modifications have been completed.
but before this did not happen...what is the reason behind that and can I fix it like before?
 

Kryptoghost

New Member
What are you copying? if you're copying a line from a terminal, i've noticed that if you copy the whole line then there is a return in there and it causes the paste to immediately resolve.

This may vary between terminal emulators, but i would try copying different content to make sure its not the emulator you're using.
 

AjayThakur3

New Member
but before this did not happen...what is the reason behind that and can I fix it like before?
What are you copying? if you're copying a line from a terminal, i've noticed that if you copy the whole line then there is a return in there and it causes the paste to immediately resolve.

This may vary between terminal emulators, but i would try copying different content to make sure it's not the emulator you're using.
Yup, I'm using ssh root shell... for configuring VPS hosting. Whenever I was coping commands for that terminal automatically entering there a command line.
 

Kryptoghost

New Member
okay, i tested it. If you just copy the text only and not the entire line, it will paste without resolving

if you copy the entire line, it will return once you paste. make sure only the text is highlighted and not the entire line.
 

wizardfromoz

Super Moderator
Staff member
Gold Supporter
G'day Ajay and welcome to linux.org :)

Correct way is below





SCREENSHOT 1 - RIGHT WAY TO BLOCK COMMANDS FOR COPY/PASTE



Wrong way is below




SCREENSHOT 2 - WRONG WAY TO BLOCK COMMANDS FOR COPY/PASTE

You can likely see the difference?

This does not occur in all cases.

The use of "sudo" indicates to our Linux OS that a command of privileged status is to follow, and the excess highlighted colour in Screenshot 2 makes Linux think that the command has been typed and then Entered.

Hopes this helps, and enjoy your Linux:D

Chris Turner
wizardfromoz

sorry I'm new at Linux...
No need - we have all been there, and some of us feel like we still ARE there :cool:
 

AjayThakur3

New Member
Oh, I have got the issue behind that I'm using Evernote for copy my commands and pasting into the terminal. But in another case when I use different apps or like web etc. to copy the command and to paste into the terminal it does not enter my pasting command automatically. But what is the cause behind that can you tell me?
 

Kryptoghost

New Member
This may not be helpful, but i highly recommend you not copy commands,

1. you wont learn them as fast, typing them out every time concretes them into memory.
2. you may accidentally do something you didn't intend to because you misunderstood the command as you glossed over.
2.5. sometimes people will post malicious commands and you may not catch it if you don't read through it.

I would say still make sure you're copying the way wizardfromoz mentioned on any software. Do not highlight white spaces after text.
 

CptCharis

Well-Known Member
I think if you use control + shift + v it will not resolved the command but I’m not sure and I can’t check it right now. I’m on my way to China !
 

Members online


Latest posts


Top