Linux Cheatsheet 1

These are some useful tricks I’ve found when using Ubuntu Linux- stuff I’ve found after hours of searching, through accidental trial and error or (on occasion) hidden in an FAQ no one reads. I’m posting this here just as much for my own reference as yours (I’ve forgotten some of these things before, and need to remember them.)

How to Get To Directories with Spaces in Their Names Via The Gnome Terminal In Ubuntu Linux

I found this out by accident, then forgot it, then found it online (finally!) after months of searching. Most geeks use underscores in the directory / file names instead of spaces, but sometimes this isn’t feasible. *SO* to indicate a space in a file name or directory name in Linux’s terminal, you type
\ (a backslash followed by a single space)

So, to get to
/home/me/Desktop/Useful Stuff
in my terminal, I would type
cd /home/me/Desktop/Useful\ Stuff/

How to Change the Location of Your Hard Drive After Linux Forgets / Changes It

I have a hard drive named SILVER. I love SILVER. Linux sometimes doesn’t. After I upgraded my OS (and a few other times) Linux forgets that it knows SILVER and renames his location SILVER_, which messes up all of my shortcuts- and my MUSIC, since I keep my music on SILVER. You’ll run into this eventually too, if you use Linux, so this is how I fixed it (be careful when doing this! It worked for me, but maybe not for you!):

Back up any crucial files (just in case!) and detach your hard drive. Open the Gnome Terminal (you can get to this by opening the RUN dialogue via pressing ALT + F2 and entering Gnome-Terminal. Run this command:
sudo nautilus
Enter your password when prompted. This will open up Nautilus (the file-management/windows thingy program) in Linux, BUT WITH SUPER-USER RIGHTS, meaning that you can mess with all sorts of things you normally can’t. BE CAREFUL WHEN DOING THIS- you can ruin your computer without it trying to stop you in this mode.

Go to /media in the Nautilus address bar

Find the *original* name/address of your hard drive there- I’ll call it ITSOLDNAME here.  Click it to make sure- it should say something like it can’t be accessed (because the computer now thinks it’s at ITSOLDNAME_ or something.) Click to select the original name and delete it. Refresh the window by clicking F5 and then plug in your hard drive again. It *should* go back to having its old name and location now, accessible via /media/ITSOLDNAME/

CLOSE NAUTILUS COMPLETELY NOW. It’s dangerous to leave it open in this mode, since it has total authority over messing with your files- one accidental click is all it takes to do something awful…