linux introduction...absolute/relative paths all files and directories have a location, specified as...
TRANSCRIPT
![Page 1: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/1.jpg)
![Page 3: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/3.jpg)
Linux Introduction
Look up the links from Pre-course material, use Google, and ...
Learn by practice and repetition!!!
![Page 4: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/4.jpg)
UPPMAX
● Uppsala Multidisciplinary Center for Advanced Computational Science○ (Uppsala supercomputer center)
● Clusters○ Rackham○ Bianca○ Snowy
● Uses Linux
![Page 5: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/5.jpg)
UPPMAX
● Uppsala Multidisciplinary Center for Advanced Computational Science○ (Uppsala supercomputer center)
● Clusters○ Rackham○ Bianca○ Snowy
● Uses Linux
![Page 6: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/6.jpg)
Linux
● Why Linux?- A powerful command-line interface
- Built for multi-user systems.
- An enormous amount of software is freely available
![Page 7: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/7.jpg)
Linux
![Page 8: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/8.jpg)
Linux
![Page 9: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/9.jpg)
Directory tree
![Page 10: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/10.jpg)
Navigation Commands
● ls – list the content of a directory
![Page 11: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/11.jpg)
Navigation Commands
● ls – list the content of a directory
![Page 12: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/12.jpg)
Navigation Commands
● ls – list the content of a directory
![Page 13: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/13.jpg)
Navigation Commands
● ls – list the content of a directory
![Page 14: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/14.jpg)
Navigation Commands
● cd – change working directory○ cd <directory name> = down○ cd .. = up
![Page 15: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/15.jpg)
Navigation Commands
● cd – change working directory○ cd <directory name> = down○ cd .. = up
![Page 16: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/16.jpg)
Navigation Commands
● cd – change working directory○ cd <directory name> = down○ cd .. = up
![Page 17: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/17.jpg)
Navigation Commands
● cd – change working directory○ cd <directory name> = down○ cd .. = up
![Page 18: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/18.jpg)
Navigation Commands
● pwd – print working directory
![Page 19: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/19.jpg)
Navigation Commands
● pwd – print working directory
![Page 20: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/20.jpg)
Absolute/Relative paths
● All files and directories have a location, specified as their path○ The root (“top”) of the file system is accessed
through /, e.g. “ls /” or “cd /”
○ An absolute path is specified from the root, e.g. /proj/g2018028/nobackup/
○ These paths are unambiguous and definite, always referring to the same location regardless of current working directory
![Page 21: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/21.jpg)
Absolute/Relative paths
● All files and directories have a location, specified as their path○ A relative path is specified from the current
working directory; “ls documents/data/files/”
○ These paths are relative to your current location, and will refer to different places depending on your current location (pwd)
Both relative and absolute paths are useful, you should understand both
![Page 22: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/22.jpg)
Navigation Commands
● Summary○ ls – list content of directroy○ cd – change working directory○ pwd – print working directory○ Use them to explore absolute/relative paths
![Page 23: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/23.jpg)
Interaction Commands
cp - copy a filecp <name of original> <name of copy>
![Page 24: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/24.jpg)
Interaction Commands
cp - copy a filecp <name of original> <name of copy> cp myText.txt copy_of_my_text.txt
![Page 25: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/25.jpg)
Interaction Commands
cp - copy a filecp <name of original> <name of copy> cp /home/dahlo/test.txt ../
![Page 26: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/26.jpg)
Interaction Commands
mv - move a filemv <name of the file> <name of the “copy”> mv /home/dahlo/test.txt ../../myDocs/
![Page 27: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/27.jpg)
Interaction Commands
mv - rename a filemv <original name> <new name> mv myText.txt copy_of_my_text.txt
![Page 28: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/28.jpg)
Interaction Commands
less - view content of a fileless <file name> less readme.txt
![Page 29: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/29.jpg)
Interaction Commands
less - view content of a fileless <file name> less readme.txt
![Page 30: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/30.jpg)
Interaction Commands
less - view content of a fileless <file name> less readme.txt
press Q to exit less
![Page 31: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/31.jpg)
Head
head - view the first rows of a filehead <filename>
![Page 32: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/32.jpg)
Head
head - view the first rows of a filehead <filename>
![Page 33: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/33.jpg)
Head
head - view the first rows of a filehead <filename>
![Page 34: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/34.jpg)
Head
head - view the first rows of a filehead <filename>
![Page 35: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/35.jpg)
Head
head - view the first rows of a filehead -n <nr of lines> <filename>
![Page 36: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/36.jpg)
Tail
tail - view the last rows of a filetail <filename>
![Page 37: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/37.jpg)
Tail
tail - view the last n rows of a filetail -n <nr of lines> <filename>
![Page 38: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/38.jpg)
Interaction Commands
nano - edit content of a filenano <file name> nano readme.txt
![Page 39: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/39.jpg)
Interaction Commands
nano - edit content of a filenano <file name>nano readme.txt
^ = ctrl
![Page 40: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/40.jpg)
Interaction Commands
rm - remove a file
There is no trash bin in CLI! Gone is gone..
rm <file name> Ex.rm readme.txtrm ../../../file1.txtrm /home/dahlo/test.txt
![Page 41: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/41.jpg)
Wildcards
*
![Page 42: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/42.jpg)
Wildcards
*
![Page 43: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/43.jpg)
Wildcards
*
![Page 44: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/44.jpg)
Wildcards
*Works with most Linux commands
Ex: cp *.txt directory1/
![Page 45: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/45.jpg)
Wildcards
*Works with most Linux commands
Ex: rm *.tmp
![Page 46: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/46.jpg)
The most important thing
TABCOMPLETION
(try to) never type a path or filename without it!
![Page 47: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/47.jpg)
TAB COMPLETION(try to) never type a path or filename without it!
![Page 48: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/48.jpg)
TAB COMPLETION(try to) never type a path or filename without it!
![Page 49: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/49.jpg)
TAB COMPLETION(try to) never type a path or filename without it!
![Page 50: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/50.jpg)
TAB COMPLETION(try to) never type a path or filename without it!
![Page 51: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/51.jpg)
Good to Know Commands
top - how much is the computer working?top
![Page 52: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/52.jpg)
Instructions how to use programsEasy to forget syntaxManual pages man <program name>Ex.
man ls (q to quit)
Good to Know Commands
![Page 53: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/53.jpg)
How do I log out?exit Exits only the current terminal
Good to Know Commands
![Page 54: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/54.jpg)
● Summary○ cp – copy a file○ mv – move a file○ less – view a file ○ nano – view and edit a file○ rm – remove a file○ head / tail○ wildcards○ tab completion – use it!!!○ top – see active processes○ man – manual pages○ exit – Log out current terminal
Good to Know Commands
![Page 55: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/55.jpg)
![Page 56: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/56.jpg)
Connect to UPPMAX
ssh - Secure SHell connection (ssh)
ssh -Y <username>@rackham.uppmax.uu.seEx:
ssh -Y [email protected]
Terminal in Linux and OS X
MobaXterm in Windows (http://mobaxterm.mobatek.net/)Putty also alternative, but not as good..
![Page 57: Linux Introduction...Absolute/Relative paths All files and directories have a location, specified as their path The root (“top”) of the file system is accessedNavigation Commands](https://reader034.vdocuments.us/reader034/viewer/2022042111/5e8c869329d8a07e655e2558/html5/thumbnails/57.jpg)
Laboratory time!
https://scilifelab.github.io/courses/ngsintro/1905/labs/linux-intro