Linux Commands (From Emails)

A quick one that has been coming up a lot via email. This is for those just learning Linux and trying out the Raspberry Pi.

Question

How do I rename a folder or file in Linux from the command line?

Answer

The command ‘mv’ can move files and folders, this includes changing their┬ánames.

Question

How do I change directory from the Linux shell?

Same as in DOS/Windows, use the ‘cd’ command. Linux also allow ‘..’ to go back a directory and ‘~’ to return home.

Question

How do I know what folder I am in?

The command ‘pwd’ command is your friend. It stands for ‘Print Working Directory’.

Question

Why doesn’t ‘LS’ or ‘DIR’ work?

Commands in Linux (*nix) are case sensitive, try lower case. You can also use ‘ll’ which also lists aliases.

Posted in Random Content and tagged , , , , , , , , .

Leave a Reply