ls | lists files and folders |
ls -lrt | lists files and folders in datel order |
ls -la | list hidden files and folders and visible |
cd /folder | cd means to change folder where folder is a valid folder |
cd / | changes you back to the root path |
cd .. | changes folders back one level |
mount | show existing partitions |
mount -a | mount all partitions in files /etc/fstab |
mount /mnt/cdrom | mounts the cd-rom drive providing a disc is inserted, replacing cd-rom with floppy will mount the floppy dirve |
vi filename | edit a file where filename is a valid filename |
find /etc -name expo* | find files, syntax is (find “start at path” “type of file to find” filename and wildcards), in this example I am looking for all files that start with expo in the location of the /etc folder |
locate expo* | also allows you to find files |
cp /path/file1 /path/copy_of_file1 | copy a file or folder to another location and using the -R after cp if its a folder copies all the contents of the folder too. |
mv /path/file1 /path/copy_of_file1 | move a file or folder to another location or rename the file using the -R after mv if its a folder moves all the contents of the folder too. |
rm file1 | deletes a file or folder is you wish to delete without being prompted use -f using the -R after rm if its a folder removes all the contents of the folder too. using -Rf move everything in a folder without being prompted. warning using the rm command or -R with the rm command can be dangerous if incorrect attention is paid |
df | shows the amount of space available on each partition. |
su – or username – | allows you to shell to root or another username and runs that user’s login script |