You’re being really polite, I’m sorry you’re having such a hard time.
I’ll give you a bit of an intro since it seems you’re new to Linux
- Basically every command you run (
nix-shell
,cd
, evensudo
) is a file somewhere. - Which files are used as commands? Well Ubuntu looks at your PATH variable to figure that out.
- Running
echo ${PATH}
will show an (ugly) list of folders. (the:
's are used to separate each folder) - Ubuntu will treat every file in ANY of those folders as a command (even if its not supposed to be a command)
- For example the
/usr/bin/
folder should be in your PATH, andsudo
is inside that folder. - (Running
which sudo
will tell you where that command is, ex:/usr/bin/sudo
) - You can add new folders to your
PATH
- For example (do not do this):
PATH=""
would remove all the folders, making it where you had no commands at all (you would have to close that window and open a new one) - Different users can have different PATH’s (ex: the root user has a different PATH)
- See this answer on how to change your path permanently
You might want to start by running whoami
just to show us which user you’re executing this from.
Running chmod 'u+rwx' 'shell.nix'
should give your current user (u+
) all permissions (rwx
read-write-execute) for the shell.nix
file
Once your user has permission to use shell.nix
, hopefully the command will work.
HOWEVER
- Nix should have changed your PATH automatically (might require restarting the terminal)
- Logging in as the
root
user when you don’t fully understand linux is a REALLY bad idea. Typingrm -r /
as root will delete your entire file system. - Many things (not just nix) don’t expect you to use root and they can break when you do
That guide you mentioned (docs.cardano.org), has a section that uses apt-get
. I highly recommend creating a normal user and then using the apt-get
instructions (for everything, not just docs.cardano.org) until you’re more familiar with Linux. Sadly, installing things on Linux isn’t always the most friendly and easy to use you’re going to have to do a lot of Googling. Watch as many video tutorials as possible. Nix is one of the hardest Linux tools to fully understand, but you came to the right place.