
Wednesday, 13th February 2008 at 12:50pm
I thought I should make a post so that I have something to check back to when I've forgotten some commands for stuff. Everything here is pretty basic, really and you should make an effort to remember them.
These commands are all case sensitive, as far as I've worked out.
cd – this changes the directory you're in. If you're logged in as your user (which you should be) then just typing the command will take you back to your home directory. At the moment that will be pretty empty. If you put a directory as a parameter after you write "cd", you'll go to that directory. For example, if you type "cd /etc/" you'll get taken to the /etc/ directory.
Terminology note for Windows users: Stop calling them "folders". You'll get laughed at. They're "directories" on Linux.
ls – (that's "L", but lower case, of course) this outputs all the things that are in the directory you're in. It doesn't output them very pretty, so instead you can do "ls -lh" and that will output the same thing, but each file is on its own line and you'll get some data about it. If you want to check what's in a directory you're not currently in, you can just add the directory path at the end.
su – sometimes you'll be in a situation where you need to be logged in as root. But I've already told you not to be in root all the time, and you should stick with that. "su" stands for "switch user". Just typing that command on its own will allow you to act as root for a little while. You'll be requested for root's password though. You can switch to other user's too, by putting their username after the command.
Remember, when you've finished, come back out of root by typing "exit".
nano – the default text editor on Debian (etch at least) is "nano". You can get to it by typing "nano", and you'll have a blank text editor. It's pretty low feature so don't expect to be cutting and pasting a lot at the moment. You can edit a file by putting its path after the command.
Don't go editing things you don't understand though!
I'll add more later, but for now I've been using that linux help site I linked to earlier.