I have no clue to why this isn't working but when I try creating a shell path variable in /etc/bash.bashrc.

This is my variable SCHOOL="/home/stephen/Steve's\ Stuff/School"

When I type $SCHOOL into the terminal I get bash: cd: /home/stephen/Steve's\: No such file or directory

Why the backslash? Linux file names can have spaces in them. However, when you invoke the name, place double quotes around the $SCHOOL variable. IE:

SCHOOL="/home/stephen/Steve's Stuff/School"
mkdir "$SCHOOL"
cd "$SCHOOL"

If you don't use the double quotes when you create the directory, the single quote will make bash take data until it sees another single quote.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.