linux introduction · linux introduction you will not learn this now. google it or look at lecture...
TRANSCRIPT
![Page 1: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/1.jpg)
![Page 3: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/3.jpg)
Linux IntroductionIntroduction
You will not learn this now.Google it or look at lecture slides when you need it.
Practice makes perfect :)
![Page 4: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/4.jpg)
UPPMAX
Uppsala Multidisciplinary Center for Advanced Computational Science
(Uppsala supercomupter center)
Clusters Milou Tintin
Uses Linux
![Page 5: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/5.jpg)
UPPMAX
Uppsala Multidisciplinary Center for Advanced Computational Science
(Uppsala supercomupter center)
Clusters Milou Tintin
Uses Linux
![Page 6: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/6.jpg)
Why Text?
UPPMAX is only accessible through SSH (Secure Shell) for security and speed
Command Line Interface (CLI)
Scary at first, but wonderful to work with Automation and scripts Super computing not
possible without it
![Page 7: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/7.jpg)
Navigation Commands
![Page 8: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/8.jpg)
Navigation Commands
ls – list the content of a directory
![Page 9: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/9.jpg)
Navigation Commands
ls – list the content of a directory
![Page 10: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/10.jpg)
Navigation Commands
ls – list the content of a directory
![Page 11: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/11.jpg)
Navigation Commands
ls – list the content of a directory
![Page 12: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/12.jpg)
Navigation Commands
cd – change working directory cd <directory name> = down cd .. = up
![Page 13: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/13.jpg)
Navigation Commands
cd – change working directory cd <directory name> = down cd .. = up
![Page 14: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/14.jpg)
Navigation Commands
cd – change working directory cd <directory name> = down cd .. = up
![Page 15: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/15.jpg)
Navigation Commands
cd – change working directory cd <directory name> = down cd .. = up
![Page 16: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/16.jpg)
Navigation Commands
pwd – print working directory
![Page 17: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/17.jpg)
Navigation Commands
pwd – print working directory
![Page 18: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/18.jpg)
Navigation Commands
Summary ls – list content of directroy cd – change working directory pwd – print working directory
![Page 19: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/19.jpg)
Interaction Commands
Copy a file
cp <name of original> <name of copy>
![Page 20: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/20.jpg)
Interaction Commands
Copy a file
cp <name of original> <name of copy>
cp myText.txt copy_of_my_text.txt
![Page 21: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/21.jpg)
Interaction Commands
Copy a file
cp <name of original> <name of copy>
cp /home/dahlo/test.txt ../../myDocs/
![Page 22: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/22.jpg)
Interaction Commands
Move a file
mv <name of original> <name of copy>
mv myText.txt copy_of_my_text.txt
![Page 23: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/23.jpg)
Interaction Commands
Move a file
mv <name of original> <name of copy>
mv /home/dahlo/test.txt ../../myDocs/
![Page 24: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/24.jpg)
Interaction Commands
View content of a file
less <file name>
less readme.txt
![Page 25: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/25.jpg)
Interaction Commands
View content of a file
less <file name>
less readme.txt
![Page 26: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/26.jpg)
Interaction Commands
View content of a file
less <file name>
less readme.txt
(q to exit)
![Page 27: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/27.jpg)
Head
View the first rows of a file head <filename>
![Page 28: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/28.jpg)
Head
View the first rows of a file head <filename>
![Page 29: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/29.jpg)
Head
View the first rows of a file head <filename>
![Page 30: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/30.jpg)
Head
View the first rows of a file head <filename>
![Page 31: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/31.jpg)
Head
View the first n rows of a file head -n <nr of lines> <filename>
![Page 32: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/32.jpg)
Tail
View the last rows of a file tail <filename>
![Page 33: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/33.jpg)
Tail
View the last n rows of a file tail -n <nr of lines> <filename>
![Page 34: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/34.jpg)
Interaction Commands
Edit content of a file
nano <file name>
nano readme.txt
![Page 35: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/35.jpg)
Interaction Commands
Edit content of a file
nano <file name>
nano readme.txt ^ = ctrl
![Page 36: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/36.jpg)
Interaction Commands
Remove a file
rm <file name>
Ex.
rm readme.txt
rm ../../../file1.txt
rm /home/dahlo/test.txt
There is no trash bin in Linux! Gone is gone..
![Page 37: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/37.jpg)
Wildcards
*
Works with most Linux commands
![Page 38: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/38.jpg)
Wildcards
*
Works with most Linux commands
![Page 39: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/39.jpg)
Wildcards
*
Works with most Linux commands
![Page 40: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/40.jpg)
Wildcards
*
Works with most Linux commands
Ex: cp *.txt directory1/
![Page 41: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/41.jpg)
Wildcards
*
Works with most Linux commands
Ex: rm *.tmp
![Page 42: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/42.jpg)
Good to Know Commands
TABCOMPLETION
Never write a path or filename without it!
![Page 43: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/43.jpg)
Good to Know Commands
TAB COMPLETION
Never write a path or filename without it!
![Page 44: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/44.jpg)
Good to Know Commands
TAB COMPLETION
Never write a path or filename without it!
![Page 45: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/45.jpg)
Good to Know Commands
TAB COMPLETION
Never write a path or filename without it!
![Page 46: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/46.jpg)
Good to Know Commands
TAB COMPLETION
Never write a path or filename without it!
![Page 47: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/47.jpg)
Good to Know Commands
How much is the computer working?
top
![Page 48: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/48.jpg)
Good to Know Commands
Instructions how to use programs Easy to forget syntax Manual pages
man <program name>
Ex.
man ls
(q to quit)
![Page 49: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/49.jpg)
Good to Know Commands
How do I log out? exit
Exits only the current terminal
![Page 50: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/50.jpg)
Good to Know Commands 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 curren terminal
![Page 51: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/51.jpg)
Connect to UPPMAX
Secure SHell connection (ssh)
ssh -X <username>@milou.uppmax.uu.se Ex: ssh -X [email protected]
Terminal in Linux and OSX MobaXterm in Windows (http://mobaxterm.mobatek.net/)
Putty also alternative, but not as good..
![Page 52: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/52.jpg)
Reservations
Special for this course salloc -A g2015031 -t 07:00:00 -p core -n 1 --no-shell --reservation=g2015031_14 &
--reservation will be proj id and day Will start a node which you have access to
Check which node with squeue -u username ssh to given node, from within UPPMAX
![Page 53: Linux Introduction · Linux Introduction You will not learn this now. Google it or look at lecture slides when you need it. Practice makes perfect :) UPPMAX ... UPPMAX is only accessible](https://reader033.vdocuments.net/reader033/viewer/2022042219/5ec5c1d375eb2b22f126d882/html5/thumbnails/53.jpg)
Laboratory time!