ICP-1002: ICT LaboratoryIntroduction to Linux      Lab 1 – Introduction Linux and UNIX File System                        ...
ICP-1002: ICT LaboratoryIntroduction to Linux         Lab 1b – Introduction And File System                           Oper...
ICP-1002: ICT LaboratoryIntroduction to Linux          Lab 1b – Introduction And File System                           UNI...
ICP-1002: ICT LaboratoryIntroduction to Linux         Lab 1b – Introduction And File System                       GNU / Li...
ICP-1002: ICT LaboratoryIntroduction to Linux         Lab 1b – Introduction And File System                       Log in t...
ICP-1002: ICT LaboratoryIntroduction to Linux         Lab 1b – Introduction And File System                       Change t...
ICP-1002: ICT LaboratoryIntroduction to Linux         Lab 1b – Introduction And File System                       Create a...
ICP-1002: ICT LaboratoryIntroduction to Linux          Lab 1b – Introduction And File System                           Hei...
ICP-1002: ICT LaboratoryIntroduction to Linux            Lab 1b – Introduction And File System                A filesystem...
ICP-1002: ICT LaboratoryIntroduction to Linux           Lab 1b – Introduction And File System            A path specifies ...
ICP-1002: ICT LaboratoryIntroduction to Linux                Lab 1b – Introduction And File System            Exercise: Cr...
ICP-1002: ICT LaboratoryIntroduction to Linux                 Lab 1b – Introduction And File System            Exercise: C...
ICP-1002: ICT LaboratoryIntroduction to Linux             Lab 1c – Introduction And File System            Exercise: Write...
ICP-1002: ICT LaboratoryIntroduction to Linux             Lab 1c – Introduction And File System            Exercise: Write...
ICP-1002: ICT LaboratoryIntroduction to Linux                 Lab 1c – Introduction And File System            Exercise: W...
ICP-1002: ICT LaboratoryIntroduction to Linux               Lab 1c – Introduction And File System  The relative path from ...
ICP-1002: ICT LaboratoryIntroduction to Linux               Lab 1c – Introduction And File System  The copy command (cp) c...
ICP-1002: ICT LaboratoryIntroduction to Linux                   Lab 1c – Introduction And File System  You can rename a di...
ICP-1002: ICT LaboratoryIntroduction to Linux                  Lab 1c – Introduction And File System  Create the following...
Upcoming SlideShare
Loading in...5
×

Lab1

1,077

Published on

Published in: Technology, News & Politics
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,077
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
12
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Lab1

  1. 1. ICP-1002: ICT LaboratoryIntroduction to Linux Lab 1 – Introduction Linux and UNIX File System ICT 1002 – Introduction to Linux Liam Kurmos Hashim Yaqub
  2. 2. ICP-1002: ICT LaboratoryIntroduction to Linux Lab 1b – Introduction And File System Operating Systems Kernel Shell User Application ●Microsoft DOS text only shell ●Windows 95 introduced Graphical Shell Device (GUI) Drivers (Apple introduced GUIs much earlier) ...long before all this... there was UNIX
  3. 3. ICP-1002: ICT LaboratoryIntroduction to Linux Lab 1b – Introduction And File System UNIX … since 1969 ●Originally created to run on large main frame systems. ●Multi-user from the start ●Has forked into many many different implementations over the years. ●Linux is opensource UNIX
  4. 4. ICP-1002: ICT LaboratoryIntroduction to Linux Lab 1b – Introduction And File System GNU / Linux – Open Source UNIX ●Open Source operating system. ●Linux is the Kernel. Developed by Linus Torvalds 1992 ●Leading server operating system, and runs the 10 fastest supercomputer ●Linux is open source, secure. ●Runs on the desktop too!
  5. 5. ICP-1002: ICT LaboratoryIntroduction to Linux Lab 1b – Introduction And File System Log in to your Virtual Machine ●Find Putty TTY on the windows system ●Connect to your Virtual Machine 147.143.75.XX where XX is your unique machine. ●You have logged in as the root user. The superuser. First thing to do, change the password! ●Super user has power which can be dangerous. Create another user!
  6. 6. ICP-1002: ICT LaboratoryIntroduction to Linux Lab 1b – Introduction And File System Change the root password... before someone else does. ●Changing the password is easy. Just use the command: passwd ●If in doubt you can always check what a command does with the man command (manual). man passwd
  7. 7. ICP-1002: ICT LaboratoryIntroduction to Linux Lab 1b – Introduction And File System Create a new user & change the password ●useradd -m YourNewUsersName ●passwd YourNewUsersName ●Now type exit and log back in with your new user.
  8. 8. ICP-1002: ICT LaboratoryIntroduction to Linux Lab 1b – Introduction And File System Heirarchical tree structures. Root Node Node Parent Node Child Node Leaf Node
  9. 9. ICP-1002: ICT LaboratoryIntroduction to Linux Lab 1b – Introduction And File System A filesystem is a heirarchical tree structure. Root / Directory etc etc homedir eepa02 Documents Pictures Code SomeJavaCode.java
  10. 10. ICP-1002: ICT LaboratoryIntroduction to Linux Lab 1b – Introduction And File System A path specifies a chain in the structure. /homedir/eepa02/Code/SomeJavaCode.java •The first / represents the root dir. •Then a slash after each dir. Root / Directory etc etc homedir eepa02 Documents Pictures Code SomeJavaCode.java
  11. 11. ICP-1002: ICT LaboratoryIntroduction to Linux Lab 1b – Introduction And File System Exercise: Create the following structure in your home dir. List the commands you used to make them. YourHomeDir You will need the commands cd DirectoryName ls DirectoryName Ex 1-1 mkdir DirectoryName pwd . is a special director that means the current directory Granny .. is a special directory that means the parent dir. Mum Daughter1 Daughter2 Daughter3
  12. 12. ICP-1002: ICT LaboratoryIntroduction to Linux Lab 1b – Introduction And File System Exercise: Create the following structure in your home dir. List the commands you used to make them. YourHomeDir Animals Reptiles Mammals Birds Snakes Bats Eagles Falcons GoldenEagles Bears
  13. 13. ICP-1002: ICT LaboratoryIntroduction to Linux Lab 1c – Introduction And File System Exercise: Write down the absolute directory paths for the paths in green / homedir ee.... Animals Reptiles Mammals Birds Snakes Birds Eagles Falcons Vipers Pythons GoldenEagles Birds RoyalPythons
  14. 14. ICP-1002: ICT LaboratoryIntroduction to Linux Lab 1c – Introduction And File System Exercise: Write down the absolute directory paths for the paths in green / homedir ee.... Animals Reptiles Mammals Birds Snakes Birds Eagles Falcons Vipers Pythons GoldenEagles Birds RoyalPythons
  15. 15. ICP-1002: ICT LaboratoryIntroduction to Linux Lab 1c – Introduction And File System Exercise: Write down the absolute directory paths for the paths in green / homedir ee.... Animals Reptiles Mammals Birds Snakes Birds Eagles Falcons Vipers Pythons GoldenEagles Birds RoyalPythons
  16. 16. ICP-1002: ICT LaboratoryIntroduction to Linux Lab 1c – Introduction And File System The relative path from Snakes to birds is ./../../Mammals/Birds, or equivalently ../../Mammals/Birds. The first dot just means this directory so isnt strictly necessary but makes it clear were talking about a relative path. / Write down relative paths for the following: homedir 1) Mammals to homedir 2) Reptiles to Mammals 3) GoldenEagles to RoyalPythons ee.... Animals Reptiles Mammals Birds Snakes Eagles Falcons Birds Vipers Pythons GoldenEagles Birds RoyalPythons
  17. 17. ICP-1002: ICT LaboratoryIntroduction to Linux Lab 1c – Introduction And File System The copy command (cp) can be used to copy both files and directories, however as a safety measure when you copy directory you need to use the r – switch. So if you had the structure on the left. Typing: cp -r /homedir/eeXYZ/Jones/Granny /homedir/eeXYZ/Hughes would give the structure on the right. (on most unix systems switches are allowed at the end of the command, after the paths instead) / / homedir homedir ee.... ee.... Jones Hughes Jones Hughes Granny Granny Granny Mum Mum Mum Daughter1 Daughter2 Daughter3 Daughter1 Daughter2 Daughter3 Daughter1 Daughter2 Daughter3 If you were currently in the home directory eeXYZ, which you can always get to by typing: cd ~ The you could use relative paths and just type: cp -r ./Jones/Granny ./Hughes
  18. 18. ICP-1002: ICT LaboratoryIntroduction to Linux Lab 1c – Introduction And File System You can rename a directory with the move command mv. So if you were in the home directory and had the structure on the left (which we created ealier). Typing mv ./Animals ./African Would give the structure on the right. eeXYZ eeXYZ African Animals Reptiles Reptiles Mammals Mammals Birds Birds Snakes Snakes Bats Bats Eagles Falcons Eagles Falcons Golden Eagles Bears Golden Eagles Bears
  19. 19. ICP-1002: ICT LaboratoryIntroduction to Linux Lab 1c – Introduction And File System Create the following structure. You can use mv and cp to save time. Use relative paths. / homedir ee.... European Asian Reptiles Mammals Birds African Snakes Reptiles Mammals Eagles Falcons Bats Birds Snakes Golden Eagles Bears Eagles Falcons Bats Asian Reptiles Mammals Birds Golden Eagles Bears Snakes Eagles Falcons Bats Golden Eagles Bears
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×