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

AjayThakur3

New Member
Joined
Feb 4, 2019
Messages
8
Reaction score
0
Credits
0
Why is Terminal automatically entering my command after pasting in terminal? I'm using ubuntu... vps?
 


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.
 
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?
 
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.
 
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.
 
do you copy the whole line or just the text with no white spaces at the end?
 
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.
 
sorry I'm new at Linux... could you elaborate properly with an example?
 
G'day Ajay and welcome to linux.org :)

Correct way is below



rMUmig7.png


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



Wrong way is below


updfcP2.png


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:
 
but in my console, it is automatically entering after pasting?
 

Attachments

  • Screenshot 2019-02-05 at 8.07.46 PM.png
    Screenshot 2019-02-05 at 8.07.46 PM.png
    230 KB · Views: 460
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?
 
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.
 
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