Funny/Useless commands

Is yes really uselss though? It’s the perfect tool for certain use case scenarios. For instance:

yes All work and no play makes Jack a dull boy

Except this doesn’t do anything except raising an error :confused: you’d need to use --no-preserve-root. Also running it as non-root is kinda lame anyway :stuck_out_tongue:

1 Like

Yeah, I only ever use it with sudo because I am lame. Huehuehue

clear && fortune | cowsay -n | lolcat

Because motherfuckin’ rainbows! :+1:

4 Likes

Now you know what inspired my username. :smile_cat:

I’ve used this to pipe /dev/zero to an openssl stream then to /dev/sdX for a much faster random stream than /dev/urandom

dd bs=1M if=/dev/zero |
  openssl enc -rc4 \
  -K $(dd bs=1 count=16 if=/dev/random | hexdump -e '8/4 "%08x"') \
  -iv 00 -bufsize 65536 |
  (dd bs=1 count=65536 of=/dev/null &&
sudo dd ibs=65536 obs=1M of=/dev/sdX)
2 Likes

The over usage of sudo in guides that are performing a ton of super user commands. sudo su - is your friend.

If I find a guide that has every command prefixed with sudo I stop reading and go elsewhere, and I tell people that want to learn linux the same. If the author doesn’t know how to become root for a ton of privileged commands, the author shouldn’t be writing a guide.

On many of my systems I don’t even have sudo installed, becoming root is as simple as su - if you know root’s password.

2 Likes

I can see the reasoning behind using sudo in a guide rather than instructing someone to use sudo su -. I see a lot of new Linux users look up guides on how to perform some action and never read through the entirety of the guide. Showing a new user how to become root and not taking the time to explain the reasoning behind it is just as irresponsible as giving a child a loaded gun and walking away, imo. Unfortunately, that means that users who understand the tricks of how to permanently become root have to deal with guides that use sudo for every command, but the guide still gets the point across, eh?

I miss the good ole days where people knew the difference between prompts…

[servername] $

[servername] #

5 Likes

sl is great. just displays a steam locomotive.

3 Likes

$username
#password
fuck if i remember have not used a GUI less environment for a server connection for probably 20 years.

but i loved and still loving using ping ( yes windows mainly) doing hop tests and trace routes every so often .

Agreed, so the guide should cover it. It goes both ways though.

I have seen soo many guides that tell people to run sudo make then sudo make install… etc. Or sudo chmod 777 /some/file.

What’s worse, educating people to prefix EVERYTHING with sudo or teaching people to become root for the session?

Is it really such a good idea to encourage running sudo for every single command, forming a habit that could one day screw them over? Ie: Permission Denied, Oh, I remember fixing that once before by using sudosudo rm -rf /

2 Likes

Personally I think it’s better to prefix everything with sudo mostly because (hopefully) you’re not actually going to run sudo echo "text" > file.txt.

I think this entire discussion is mostly focused on guides that are aimed at new users with little to no terminal experience, in which case I’d say that prefixing commands that require elevated privileges is preferable when the alternative is teaching a newbie to run su - when he just wanted to update his system because now he has a terminal instance running as root and he might not be aware of it, assuming we’re strictly talking about newbies here.

One has to remember that many of these guides are not being consumed by native english speakers, so having something to simply copy and paste is great.

Additionally, trying to make the onboarding of a non-power-user to linux is also a goal for some of the companies backing the distros.

1 Like

that makes me curious…

Shouldnt the non native english people also being using a different keyboard/OS language? How does copy and paste work when the OS is setup for a different LANG?

Haven’t tried anything but en-us and en-uk keyboard layouts. Most terminals only support 7-bit encoding anyway, so I’d imagine the copy and paste is still fine. I forget what project I was looking at in GitHub that was mainly a japanese team managing, but all the comments in the bash scripts were romanji. Probably for that reason.

I use both sudo and su. If I’m doing something big i usually su into root but otherwise i just sudo it. Sometimes i even just ‘sudo mc’ to get both a root filemanager and ctrl-o to root terminal.
The importand thing here is to know when root is needed. When i started using linux i found myself always using root which screwed me over a couple of times before i learned my lesson.

I had server hardware installed in a bomb proof mountain server hall connected directly to my country’s internet backbone, sneaked in by a friend with connections ~20 years ago.
It was the best game server ever with ping and bandwidth you could only dream about in those days.
I later fucked it up by not being careful.
The hardware probably still is there but it can’t boot anymore because of me being a moron. Lesson learned.

That’s all fine and dandy until you try and take one person’s root access away while keeping the same password for the other however many people that use it

but yeah, for single user machines it doesn’t make much sense. Especially because I ALWAYS forget to do it and have to type sudo !!

ProTipAliasTimeForNewbs
  1. echo "alias fuck=sudo" >> .bash_aliases
  2. dnf update -y
  3. fuck !!

pardon the french

Also man ass gives you “No manual entry for ass”. lulz

1 Like

How would it be any different? Locale does not affect copy/paste, merely output of programmes that support it. And keyboard layout only affects how keystrokes are translated to characters.

2 Likes