why and how isn't mkdir working
5,385
All system folders are owned by root; thus,you need root permissions:
sudo mkdir -p /usr/local/java
Related videos on Youtube
Author by
tbone
Updated on September 18, 2022Comments
-
tbone almost 2 years
how does mkdir work? I've been trying to install java, and when I type:
mkdir -p /usr/local/java
nothing happens except the terminal just writes it down. when I get to later steps, it says that directory
/usr/local/java
doesn't exist-
Matt O. over 6 yearsAre you using sudo if you're non-root user? /usr/local is owned by root, therefore mkdir won't work without the proper privileges.
-
Sergiy Kolodyazhnyy over 6 yearsAre these exact steps youre doing ? No error ?
mkdir
should produce "Permission denied" error because /usr beling to root, yet you said "nothing happens". Can you clarify, please
-
-
Matt O. over 6 yearsPaying attention to this users score, it's advisable to explain why he needs root permissions to prevent repeat questions in the future.
-
Sergiy Kolodyazhnyy over 6 years
sudo
is indeed necessary, however note that OP said nothing happens if they do the command as regular user. However,mkdir
should produce "Permission denied" error. There's discrepancy -
cyclingLinguist over 3 yearsI too have the same problem even using sudo.