• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Don't Copy-Paste from Website to Terminal

I usually paste to a plain text file (generally so I have a log of what I was doing), but still wouldn't expect that. Good advice!
 
Scary but I do admit it's kinda clever. The worse is if there's a return in there it will automaticly execute the command, so it's not like you can go "WTF is this?" and cancel out.

I usually don't copy and paste anything in terminals for that reason alone, even if I copy a command from a text file and accidentally copy the return it wont give me a chance to react. Perhaps it's a prototype and I want to change a few things but by copy and pasting it will submit right away.

I try to force myself to type it out so if it's something I use often I can memorize it. I have terrible memory though. I still can't gzip or rsync something from memory, I always have to go look at old scripts to know what the flags are.

For really repetitious stuff like compiling a program I usually make a script that's specific to that program. Especially ones with dependancies where the compile strings are more complicated then just g++ file.cpp -o program.

And yeah if I don't know what a command does I wont just blindly type it, I'll try to understand what it does first. I do admit I sometimes get lazy though especially with regex stuff piped into sed, grep and other such commands where it can be a real brain buster trying to figure the logic out.
 
Is it safe to copy CLI commands from say...Gentoo's or Debian's install guide?

Open source being new territory for me, and the wikis being able to be edited by anyone, just wondering about their reliability.
 
Is it safe to copy CLI commands from say...Gentoo's or Debian's install guide?

Open source being new territory for me, and the wikis being able to be edited by anyone, just wondering about their reliability.

Generally yes, but that applies to everything. Generally commands are safe to copy/paste, but sometimes they aren't. Any site can be hacked, and altered, but the pay off wouldn't be that great. I'd be more concerned about some random blog you found, with the owner embedding code that would hose your system. Old school mayhem type attacks, rather than the stealthy money getters that are popular today.

Just be aware of what can be done, and keep an eye open for it.

Edit:
Speaking of mayhem, you should understand what you're putting into the terminal, obfuscated or not. There's people that'll happily trash your system just for the lulz. Others will put something down, and assume you know better than put it into the terminal, but someone always does. You find stuff like than on 4chan and reddit more than legitimate sites, but you should always be on guard.
 
Last edited:
Well it looks like it's time to start checking the HTML code before copying stuff into CLI.

Use vi mode in bash. If you hit v, you'll get a vim session that you can paste the command into and edit/inspect it like any other text file in vim. When you save and close the vim session the command will be executed.
 
maybe I should reinstall linux or something since I've been doing it for so long. better safe then sorry. who knows what kind of spyware might be lurking in my system...
 
Back
Top