|
IntroductiontolinuxBog'liq introductiontolinuxIF YOU GET LOST:
The Tilde ( ~ ) icon is used to represent your home directory. If you ever
need to get back home, you can type the following to return to your home directory
cd ~
The ~ parameter can be passed in a string of commands, as you will see further on, to directly access
the Home directory when you are in other parts of the system.
On most systems, your home directory should be /home// , however on some centrally
managed or network systems, your home path could be different. Run ‘cd ~’ to change directory to
your home directory, then ‘pwd’ to find the full path of your home directory.
| 15
The Linux Filesystem
The linux File System is different to that of Windows, in that the File System is not represented by
Hard Drives and CD Drives like c:\ & d:\ etc. Instead, the whole system is represented by the root
directory, or ‘/’. Files, folders, and drives, all exist within this.
Within ‘/’, exists a standard core directory structure:
The folder you operate in 95% of the time, is ‘~’, which usually equates to ‘/home/’ (See
previous page for notes on the location of your home directory and how to find it), e.g: ‘/home/
msai135/’.
Even devices exist as files within a Unix system. They are located in ‘/dev/’, If you insert a CD, the
drive will be mounted to ‘/media/cdrom’. Some systems do this automatically, however sometimes
this needs to be done manually. An example command to run to do this would be: ‘mount /dev/sdb1
/media/cdrom’. This would allow you to access the CD-ROM by browsing ‘/media/cdrom/’. Before
ejecting the disk, you would exit from the mounted directory, then run ‘umount /media/cdrom’, and
then eject the disk from the computer. Some systems will respond to the command ‘eject’ for CD-
ROMs, automatically unmounting and ejecting the drive in one command.
USB Sticks, Memory Cards, and Hard Disks are all mounted in the same way, having a corresponding
‘/dev/’ file, and a location to mount it to. This could be in ‘/home//Storage’,
or in ‘/mnt’. It makes no difference to Linux, making it a very flexible and scalable OS.
|
| |