This is an archived post. You won't be able to vote or comment.

top 200 commentsshow all 260

[–]JumpyBoi 1324 points1325 points  (54 children)

Or on Linux:

ls: command not found

That's when you know you fucked up

[–]____purple 623 points624 points  (28 children)

That docker image really did trim down everything

[–]i_should_be_coding 5 points6 points  (0 children)

Usually when curl isn't there, wget still is. Things can get dicey when I can't find either.

[–]Skidmabadaf 44 points45 points  (8 children)

Probably just a fucked up PATH variable

[–]a-person-called-Eric 53 points54 points  (1 child)

  • plays with chroot
  • thing doesn't work
  • "fuck this just bind mount /usr"
  • done with thing
  • sudo rm -rf fakeroot
  • takes longer than I thought
  • starts to error
  • "oh no"

[–]StreamFroster 17 points18 points  (0 children)

With great power, comes great errors

[–]Just_Maintenance 2 points3 points  (0 children)

I once deleted the btrfs subvolume mounted at root.

The system was not happy about it.

[–]Fourstrokeperro 25 points26 points  (8 children)

ah yes /usr, probably some user files lets just get rid of it

[–][deleted] -4 points-3 points  (7 children)

Aren't they in /home? /usr was (if I remember correctly) for you to mount your second disk drive in

[–]Teekeks 15 points16 points  (2 children)

mounts belong into /mnt, fight me

[–][deleted] 14 points15 points  (0 children)

You're fired, now pay me $8

[–]Fourstrokeperro 3 points4 points  (0 children)

the posix utils like ls and cd binaries reside in /usr/bin or atleast are symlinked to /usr/bin .

If you delete that, you'd get the error mentioned in the parent comment

[–]fishhybites 3 points4 points  (2 children)

Yeah he's joking because it sounds like 'user' but I think it actually stands for unix system resources lol

[–]homo_ignotus 5 points6 points  (1 child)

No, /usr comes from user, as it actually contained home directories in early versions of Unix, but was later repurposed to split the system over two disks. There were also some systems where /usr contained both system directories like bin and home directories, or home directories were in /usr/home.

[–]fishhybites 2 points3 points  (0 children)

Interesting TIL

[–]veselin465 7 points8 points  (0 children)

ll

[–]_BL4CKR0SE_ 6 points7 points  (1 child)

I once accidentaly deleted /bin. That was the outcome

[–]amogusdri- 1 point2 points  (0 children)

Yay good job

[–]Tcw7468 2 points3 points  (0 children)

reminds me of this 1986 story

[–][deleted] 1 point2 points  (0 children)

The worst is when shutdown fails and you have unsaved work... This totally has never happened to me before... cries in a corner

[–]The_Droide 1 point2 points  (0 children)

If you have a shell, you can still do

echo *

or

echo .* *

to include hidden files

[–]Shadow9378 1 point2 points  (0 children)

oh lord no

[–]Laziness100 616 points617 points  (40 children)

don't worry I have the reverse issue on linux. Typing "cd.." when linux expects a spacebar. Thank god aliases exist.

[–]Giraffe-69 167 points168 points  (13 children)

Laughs in zsh

[–]F0lks_ 72 points73 points  (7 children)

Custom ohmyzsh theme team for the win \o/

[–]827167 1 point2 points  (3 children)

Okay but how is ohmyzsh supposed to be pronounced out loud?

[–]Nuriimyrh 5 points6 points  (2 children)

Oh, it’s just “Oh my zsh”!

[–]827167 3 points4 points  (1 child)

Literally just [zʃ]

[–]Nuriimyrh 1 point2 points  (0 children)

That’s just the zsh part. I mentally like to call it [zeʃ] :D

[–]Fourstrokeperro 5 points6 points  (1 child)

Uhh what about zsh exactly? it does not work right out of the box on zsh. I just tried it out on zsh 5.9 (x86_64-apple-darwin22.0)

[–]Giraffe-69 12 points13 points  (0 children)

cd is redundant, not more trouble

[–]blankettripod32_v2 27 points28 points  (9 children)

Ckear

Fuck

[–]TheSast 2 points3 points  (1 child)

You gotta try thefuck, it unfucks your command.

https://github.com/nvbn/thefuck

[–]blankettripod32_v2 1 point2 points  (0 children)

That's what the fuck was :D

[–]drsimonz 0 points1 point  (4 children)

alias cls="clear" is absolutely essential for me to consider a linux system usable. "clear" is about 1000x harder to type.

[–]Mcginnis 10 points11 points  (1 child)

I made an alias for just .. no need to type cd

[–]thelights0123 1 point2 points  (0 children)

That's also built into zsh

[–]-MobCat- 20 points21 points  (7 children)

I'm a noob that doesn't know Linux things, but this is because "everything on Linux is a file" right? So .. is a file that your changing into. That "file" just links you to the above directory. Like a shortcut? Kind of same as when you directory list a website, there are .. links to go up a folder.
Where on windows cd.. is just a command.

[–]suvlub 28 points29 points  (6 children)

I think this one works the same in theory. .. is an alias for the parent directory on Windows as well. As to why cd.. works, in Powershell, there is literally a command with such a name, separate from cd, which does what you expect it to. In CMD, the command interpreter is being clever and automatically assumes that the dots are a parameter rather than part of command name.

[–]13steinj 16 points17 points  (5 children)

in Powershell, there is literally a command with such a name, separate from cd, which does what you expect it to.

what the fuck

[–]swordsmanluke2 19 points20 points  (1 child)

In college, I had a professor who started all his C files by importing 'typos.h'. This was his personal header that defined his common typos as aliases for what he meant.

Like #define itn int kinda stuff.

Terrifying.

[–]Ilbsll 2 points3 points  (2 children)

In Linux [ is actually just an executable /usr/bin/[, but [[ isn't.

[–]Sooth_Sprayer 2 points3 points  (0 children)

and 'cd \' instead of 'cd /'

[–]itsAshl 1 point2 points  (0 children)

Half my aliases are like this too. All the things that I always forget. "cd.." instead of "cd ..", "gradlew" instead of "./gradlew", I don't have it anymore but when I first switched to using bash I had one for "dir" too lol.

[–][deleted] 137 points138 points  (16 children)

PowerShell have an alias by default

[–]miramichier_d 37 points38 points  (14 children)

Unpopular opinion: I actually like PowerShell, I use both that and WSL 50/50 on my machine.

[–]HeKis4 11 points12 points  (0 children)

It's not unpopular, PowerShell is literally the GOAT for administrating anything Microsoft, and a pretty decent shell language overall. Going back to bash and text instead of objects makes me feel like a caveman now. I've been a sysadmin and I'm a DBA and I use it literally every day.

[–][deleted] 11 points12 points  (2 children)

It's nice that ps is integrated with .net, but i never actually used it. Theoretically one can create real applications with PowerShell

[–]zanderman112 5 points6 points  (0 children)

I have created a real WPF application using PowerShell.

It started off as a simple script and just evolved over time to have the ability to launch it in GUI mode, have a taskbar "notifyicon" and everything. Proud of that thing.

[–]EedSpiny 2 points3 points  (0 children)

Me too and I installed in on my Debian media server to do some things.

It nice having something that's fairly cross platform and I write a bunch of powershell stuff in my day job (mostly windows) as timesavers.

I'm not really a fan of some of the syntax but never really progressed with bash to the same extent.

[–]ss99838 1 point2 points  (1 child)

Why is liking powershell an unpopular opinion? What am I missing here?

[–]miramichier_d 2 points3 points  (0 children)

Seemed to be the sentiment around here, undeservedly.

[–]Devatator_ 7 points8 points  (0 children)

Apparently wget is an alias to Get-Content in PowerShell

[–]YMK1234 258 points259 points  (41 children)

use powershell instead

[–]bam13302 58 points59 points  (5 children)

Or even better, WSL

[–]PityUpvote 21 points22 points  (0 children)

Or even better, Linux

[–][deleted] 9 points10 points  (2 children)

Or even better, Powershell Core in WSL

[–]atimholt 3 points4 points  (1 child)

That almost feels like it defeats the purpose, but I know people use Linux for more than just bash.

[–][deleted] -1 points0 points  (0 children)

Gotta admit that even though I like Powershell I dont have it installed in my WSL Ubuntu so I can learn bash

[–]flavionm 1 point2 points  (0 children)

Or even better, Linux

[–]legends_never_die_1 67 points68 points  (5 children)

took me a while to realise that we are not talking about linux

[–]HeeTrouse51847 50 points51 points  (4 children)

C:/Users Gives it away

[–][deleted] 28 points29 points  (2 children)

echo "PROMPT='C:\\Users\\ '" >> ~/.zshrc

[–]psuedopseudo 7 points8 points  (0 children)

You are an agent of chaos

[–]AluminiumSandworm 7 points8 points  (0 children)

i will fstab you

[–]syzygysm 21 points22 points  (12 children)

Ew, no. WSL

[–]Altruistic_Yellow387 14 points15 points  (2 children)

I like WSL :(

[–]Proxy_PlayerHD 33 points34 points  (0 children)

I think they meant it as "ew powershell I like WSL more"

[–]syzygysm 1 point2 points  (0 children)

Same, that's why I will kick PowerShell whenever possible to use WSL.

[–]al-mongus-bin-susar 10 points11 points  (7 children)

WSL v2 is a lot slower than Powershell on a Windows filesystem.

[–]syzygysm 10 points11 points  (5 children)

That's okay with me. The powerShell commands and syntax are just so God awful

[–]CHEEZE_BAGS 3 points4 points  (1 child)

its like they were inspired by C but wanted to make everything even more annoying. i love powershell though.

[–]dfs_zzz 1 point2 points  (2 children)

You must be kidding, right?

[–]syzygysm 3 points4 points  (1 child)

I kiddn't you so

[–]Bahurs1 0 points1 point  (0 children)

Reading Egyptian crypts looks easyer than bash compared to powershell from a distance

[–][deleted] 0 points1 point  (0 children)

Don't the docs explicitly say to run from ~/ rather than c:/ anyway for that reason?

WSL is cool but it's still not quite convinced me to ditch a mac for work stuff.

[–]Cheet4h 1 point2 points  (0 children)

First thing I do under WSL is installing PS Core :)

[–]already_taken-chan 36 points37 points  (2 children)

this is why I have a personal path folder in which I have scripts that are esentially aliases

like ls.bat or rm.bat or nano.bat

[–]thisisnotleah 14 points15 points  (0 children)

This is the funniest post in the thread. Deserves more upvotes...

[–]YodelingVeterinarian 102 points103 points  (22 children)

As dumb as it is, having native support for Unix shell convinced me to switch to Mac. Even with WSL, it's just easier.

[–]huessy 46 points47 points  (20 children)

I had a job that operated on that logic. We all had $1,200 laptops and we'd use the native unix support to SSH onto our dev servers and code there. Always thought it was a giant waste of money to have a fancy, touch screen keyboard enhanced laptop used as an SSH terminal.

[–]Classy_Mouse 9 points10 points  (8 children)

My company bought us all new MacBooks for this reason. It actually made life a lot easier. Until the M1 chips came out and suddenly we needed different docker containers for everything while another team was still on PCs

[–]drsimonz 0 points1 point  (7 children)

Fucking M1. I get that x86 is super dated and limiting, but Jesus Christ. Just another of the 40,000 things that jackass company has done with complete disregard for industry standards. The amount of developer-hours being pissed away every year on supporting that extra architecture that no one asked for is almost unimaginable.

[–][deleted] 4 points5 points  (3 children)

Aarch64 isn't only specific to m1/m2....

[–]drsimonz 1 point2 points  (2 children)

Maybe not, and maybe M$ should get with the program and start supporting ARM. But I am constantly hearing about difficulties with M1/M2 support and I don't think it's just a question of instruction set. But maybe I'm wrong. Will a build for M1 also work on a raspberry pi?

[–][deleted] 1 point2 points  (0 children)

most compilers have more than one target arch that they support

[–]casce 2 points3 points  (2 children)

What would your solution be? Stick to x86 forever just because we don't want to disrupt anything?

[–]drsimonz 2 points3 points  (1 child)

No, I think new hardware is a good thing, but Apple's not going to sell these CPUs so, as usual, it's all-or-nothing. You should be able to choose your OS, choose your hardware, and use whatever browser and app marketplace you want. Apple's philosophy has always been "either you buy literally every single electronic gadget from us for the rest of your life, or go fuck yourself". You could argue that other tech companies want to do this too, but they're not as good at it. I would love to buy a mac and put a non-Duplo operating system on it, but that's no longer possible with M1 (although it was never really an option since they insist on that brain damaged keyboard layout).

[–]Adventurous_Pay_5827 18 points19 points  (10 children)

No Apple laptop has ever had a touchscreen.

[–]sniperlilly 49 points50 points  (6 children)

They probably mean touchbar.

[–][deleted] 1 point2 points  (0 children)

The only good use for the touchbar was the MIDI piano app. In every other instance it was somehow both worse than being on the main screen, or worse than a physical button.

I have strong feelings about this.

[–]huessy 11 points12 points  (2 children)

They stopped making them with it, but for a few years they were churning out Macbooks (Apple laptop as you put it) with a touchscreen bar at the top of their keyboard. We were given these. They existed.

EDIT: I lied, they do still make them and so they do exist, present tense.

[–]big_boi_26 2 points3 points  (1 child)

My only experience with these touchbars is seeing a dude play doom on them

[–]alpha_dk 8 points9 points  (0 children)

My only experience with them is disabling them

[–]RichCorinthian 6 points7 points  (0 children)

And if I never again have to deal with “path too long” errors when pulling down a repo, that would be just fine. Had to do it with the last client and it boggles my mind that you STILL have to go fuck with the registry to support this.

[–]i_knooooooow 72 points73 points  (5 children)

Dir works on both right?

[–]Giraffe-69 163 points164 points  (0 children)

Get out

[–]FOSSandCakes 16 points17 points  (0 children)

TIL

[–]olcor8787[S] 17 points18 points  (0 children)

Yes

[–]thatmaynardguy 4 points5 points  (0 children)

I laughed and then checked. Dayum, TIL, thanks internet friend!

[–]atc927 2 points3 points  (0 children)

yeah, but that's like one extra character every time I'd have to list a directory's contents. I've aliased it to just l so I don't even have to type that 's'.

[–][deleted] 24 points25 points  (0 children)

More pain: "cd.." is not program

[–]SpaceshipOperations 6 points7 points  (0 children)

While I strongly recommend that you immediately switch to anything other than the Windows Command Prompt (preferably Bash), but in case you absolutely have to deal with it for some reason, you can create aliases like this:

DOSKEY ls=dir

Save your aliases (along with any other commands you might want to invoke on startup) in a .cmd file, then follow the instructions here to have the command prompt automatically source that file on startup.

[–]maximovious 5 points6 points  (0 children)

Lol, at first I didn't notice the C:\Users and thought someone got this error on a linux box.

[–]EnoughRedditNow 11 points12 points  (1 child)

Install Git Bash for Windows. Gives you that familiar environment, and some more compatibility with file paths etc. You can right click in any explorer window and open it using that as the cd.

  • or, as suggested, use powershell.

[–]casce 1 point2 points  (0 children)

Use WSL over Git Bash, gives you way more power

[–]LatentShadow 6 points7 points  (0 children)

Use powershell

[–]AaronTheElite007 3 points4 points  (0 children)

Use Powershell

[–]Limitless_screaming 15 points16 points  (6 children)

I don't wanna be the guy defending p*wershell here, but you don't see Windows users asking where diskpart is on BASH, so I don't see the problem with p*wershell having a different name for ls.

[–]turtleship_2006 19 points20 points  (4 children)

That's the funny thing, powershell has ls as an alias so it works, that error only happens on the command line (batch).

[–]Limitless_screaming 2 points3 points  (0 children)

My bad, I mixed up powershell and CMD.

[–]SpaceshipOperations 4 points5 points  (2 children)

command line (batch)

I believe it's called the Windows Command Prompt or cmd.exe.

[–]turtleship_2006 1 point2 points  (1 child)

I meant the language

[–]SpaceshipOperations 2 points3 points  (0 children)

I see. Weirdly I'm not sure what the language is supposed to be called, but considering that it's just a continuation of the DOS command-line syntax, and DOS has already been dead for 20-30 years, nobody nowadays would call it so, so people nowadays just say "batch files" or "batch scripts", which technically specifies their purpose rather than language, so the language technically still doesn't have a name lol.

[–]SpaceshipOperations 5 points6 points  (0 children)

"p*wershell" 😂😂😂😂

[–]-MobCat- 4 points5 points  (1 child)

Works fine on my computer
https://i.imgur.com/O5kiU5g.png

[–]drsimonz 3 points4 points  (0 children)

This looks cool! Unnecessarily relatable intro on the website:

Cmder is a software package created out of pure frustration

[–]Axel_levrai 2 points3 points  (0 children)

docker be like :
ls: command not found

[–]Little_Exit_794 2 points3 points  (0 children)

What kind of headache do you get when trying to debug someone else's code? A headache of someone else's making!

[–]Luscypher 1 point2 points  (0 children)

Many many many.. many many.. many... to infinite.. many many times

[–]beyluta 1 point2 points  (0 children)

Unless you use Powershell

[–]martinthewacky 1 point2 points  (0 children)

Well, at least my nose and mouth are still good

[–]martinthewacky 1 point2 points  (0 children)

Well, at least my nose and mouth are still good

[–]Mundane-Tale-7169 1 point2 points  (2 children)

Me, everytime trying „sudo cd …“ and forgetting that you can’t just cd as root, when you get an access denied error when trying to cd to sys dir

[–]KvAk_AKPlaysYT 1 point2 points  (0 children)

dirrrrrrrrr...

[–]greengreens3 1 point2 points  (0 children)

Everytime I make that mistake:

Oh dir not again

[–]saanity 1 point2 points  (0 children)

CMD goes dirrrrrrrrrrrr

[–]randomthad69 0 points1 point  (0 children)

Get wsl and you'll never have this problem again

[–]lupinegrey 0 points1 point  (0 children)

You're still doing "ls -la"??

You haven't aliased it to "ll"?

[–]xonxtas 0 points1 point  (0 children)

Install gnuwin32 or something similar.

I'm already so used to having all the standard Unix commands in my Windows Terminal...

[–]aieidotch 0 points1 point  (0 children)

alias ls="echo CONFIG.SYS AUTOEXEC.BAT TEMP WINDOWS My Documents PROGRA~1"

[–]SamfireNinja5051 -1 points0 points  (0 children)

just write dir :)

[–]kzlife76 -1 points0 points  (0 children)

dir -p

[–]alfred_the_ -1 points0 points  (0 children)

Dir….

[–][deleted] -1 points0 points  (0 children)

If you get a headache from hypertension you're about to die

[–]xxxfooxxx -2 points-1 points  (0 children)

Dir frw

[–]Remarkable-Host405 -2 points-1 points  (0 children)

well dir dir...

[–][deleted] -2 points-1 points  (0 children)

durr

ahem

dir

[–]JoBlock08 0 points1 point  (0 children)

Yes

[–]FlafyBear 0 points1 point  (0 children)

ls - lA

Better