I’ve saved ‘hello world’ as a .rb file on my computer running Mac OS X Lion. I’m trying to create a new directory called ruby_tutorials in the root of my file system, but I’m having some trouble.
I tried typing in the command mkdir /ruby_tutorials in a terminal, but I got this error message: ‘Permission Denied’. How can I overcome this?
Try this:
sudoallows you to execute commands as a superuser. You need administrative privileges to create a directory in your root directory. One reason to usesudofor individual commands instead of always having administrative privileges is that it protects you from accidentally harming your system.