C2110 UNIX and programming 1. lesson Petr Kulhánek, Jakub Štěpán kulhanek@chemi.muni.cz National Centre for Biomolecular Research, Faculty of Science Masaryk University, Kotlářská 2, CZ-61137 Brno Hf european H9 ^MT| £_J M ^5^^ 1 SOCial fund in the I HflflS | M|N|STRY 0F EDUCATION, OP Education *j£^JF<:, m^^0 ■ CZeCh repUbllC EUROPEAN UNION YOUTH AND SPORTS for Competltlvness '^.VAÍ>V INVESTMENTS IN EDUCATION DEVELOPMENT CZ.1.07/2.2.00/15.0233 JIXand programming 1. lesson Contents > Course aims • Motivation, syllabus, practical demonstrations > Course organization * Time schedule, teaching methods • Knowledge evaluation, final test > Cluster WOLF • Room 1.18, structure, rules, administrators > First login * Local login, Desktop environments, standard applications > Password change * Command passwd JlXand programming 1. lesson Motivation Supercomputing MetaCentrum a CERIT-SC • National grid environment • OS Debian • cca 8500 CPU cores • CEITEC/NCBR own resources cca 850 CPU cores • Total 1000 TB storage capacity • cca 10 TB per user http://www.metacentrum.cz/ http://www.cerit-sc.cz/ Free access maybe provided to any CZ university member. Follow-up course (autumn semester - block lectures in January) C2115 Practical Introduction to Supercomputing JlXand programming 1. lesson -3- Motivation, continue Alternative desktop system Oracle VM VirtualBox Í t|. *>)) 10:47 AM i> □ Záznamník učitele • Mozilla Firefox XjBubu .pXWindowS... inKalendéfCo...[ac 0 ^ fl https://is.muni.cz/auth/ucitel/?fakulta=1431 INFORMAČNÍ SYSTÉM MASARYKOVY UNIVERZITY Záznamník učitele ■ IS MU > Osobní administrativa > Záznamník učitele ZVÝRAZNĚNI pjy.e použite vyfrerv -is.muni.cz Moje predmety: CB060 Semináf NCBFt — c2110 Operační systém UNIX a základy programovaní —* C2110701 Po 13:00-14:50 A4-118 -» C2110/02 Úl 15:00-16:50 A4-118 — c2115 Praktický úvod do superpočitaní — c77s)0 Počítačová chemie a molekulové modelováni I ~* c7800 Počítačová chemie a molekulové modelováni I - cvičení rozvrh PŘEDMĚTY Předměty spravované všemi učiteli -STUDIUM přijímačky Vybrané 11 Všechny □ WinXP [Runnlng] - Oracle VM VirtualBox i H *) ' O ) * C2110-Lesson-00_001 - Microsoft PowerPoint nekomerč... Domů Vloženi Návrh Animace Prezentace Revize Zobrazení vývojář CP'S-Tvary [Ä~] I Vložit tvary Abc Abc Abc > a-QL --J - Rychlé styly' A' Přenést do popředí * ||? ' •ži Přenést do pozadí * ^ Podokno výběru jfc* Velikost Styly tvaru Styly Word... >», . i .ŕ, . i .cr . , ,4 . Uspořádat . i .9 . ■ . 1 . i .n . i .i . i .7 . ■ .i VÝVESKA DISKUSE Výbér: všichni aktivní studenti zapsaní do zvolených predmetu [Motivace, pokračovaní 1 Alternativní djejktc^c^sýstém \ personální Omezit jinak: Nápověda, setkávání n ,,„~i^,,„.w,,., , Snímek 4 z 12 "Vlastní návrh- ^ Čeština Stdrt ® b Total Commander 7.0... @ 4 Microsoft Office P... CS 4:j 10:47 Find: | pra < Previous ► Next Higrargntan TvTatrnTaíii zotero §Q Basic OS usage > Virtualization > Command line work > Scripting languages bash gnuplot awk NIX and programming 1. lesson Virtualization Oracle VM VirtualBox ^1 ^! Bcs m S ti H>), 10:47AM {J} i - □ Záznamník učitele - Mozilla Firefox I iS Záznamní... X J 0 ubuntu unity... J0X Windows... f D Kalendář Go ■ Q I ň https://is.muni.cz/auth/ucitel/?rakulta=l43l I sä OpenOffice.. WinXP [Running] - Oracle VM VirtualBox 5 C2110-Lesson-00_001 - Microsoft PowerPoint nekomerč... Návrh Animace Prezentace Revize Zobrazení Vývojář H!4 Přenést do popředí t li? *■ ^ Přenést do pozadí * 5í> Podokno výběru Uspořádat Formát 'ty \ Velikost I Host: Ubuntu 12.04 Guest: Windows XP (virtual machine) JIXand programming 1. lesson -6- Text file analysis NSTEP = 6000 TIME(PS) = 206.000 TEMP(K) = 291.69 PRESS = 0.0 142 .3142 13.5633 1.5430 0.0000 206.000 291.69 Data: /home/kulhanek/Documents/2013/C2110_UNIX/data/rst.out $ grep TIME rst.out | awk f{ print $6, $9 }f $ awk f/TIME/{ print $6, $9 }f rst.out viIX and programming 1. lesson Results Visualization minimum QM / ABF 4x500ps / variable Rewald DD (A) Creating graphs from extracted values (gnuplot). JlXand programming 1. lesson Automation Data: /home/kulhanek/Documents/2013/C2110_UNIX/video BsoBI: Ivo Kabelka JIXand programming 1. lesson -9- Course organization > Time schedule, teaching methods > Knowledge evaluation, final test JlXand programming 1. lesson -10- Time schedule, teaching Course enrollment period: Teaching: Vacations: Examinations: 2. 9. 2013 16. 9. 2013 21. 12. 2013 2. 1. 2013 29. 9. 2013 20. 12. 2013 1. 1 2014 14. 2. 2014 Extent: colloquium (2 credits) Total lecture time: 14 x 2 hours = 28 hours Total course time demands: 1 ECTS credit -> 26 hours of studies (see ECTS Label) 2 credits -> 2x 26 hours = 52 hours of studies Voluntary exercise tests via e-learning: lx per 2 weeks, accessible only 2 weeks from release unlimited opening and evaluations random generated questions set Absence two times is permitted, apologize in advance! (either by e-mailem or by IS) iNIX and programming 1. lesson Knowledge evaluation, final test Two tests in-semester: (20 minut) 2x10 points Final testing: - final test (1 hour) - script task (1 hour) Total: Passed: 50 points 30 points 100 points >= 80 points JlXand programming 1. lesson Cluster WOLF > Room 1.18 > Structure > Rules > Administrators JlXand programming 1. lesson -13- Room 1.18 >23 PC >3D visualization > Computing cluster organization Safety rules! PC room is accessible to students of LCC group, and students of any course taught in same semester in room 1.18. NIX and programming 1. lesson -14- WOLF cluster structure University network wolf.ncbr.muni.cz server Local network wolf.wolf.inet Private network: wolf.lnet (not accessible directly) IIX and programming switch wo If 01 wo If 02 wolf03 wo If 04 wo If 05 wo If 06 wo If 07 wo If 08 Work nodes (computational nodes) Operating system: Ubuntu 12.04 (Precise) LTS http://www.ubuntu.com/ 1. lesson Rules WOLF cluster is strictly dedicated to teaching purposes or scientific work within National Centre for Biomolecular Research. It is strictly forbidden to: download data with illegal contents (author protected work etc.) virus and spam distribution system hacking Removing or changes to unprotected content of other users Obligatory are rules of Masaryk University network: https://is.muni. cz/auth/do/rect/normy/smernicerektora/Smernice_MU_9-2013.pdf Login name and password is user identity. Do never give it to any other person, send (e.g. by e-mail) or save unencrypted. NIX and programming 1. lesson -16- Cluster administrators - problems Before contacting administrators, consult your problem with colleagues, teacher supervisor. If you do not solve problem, please report to administrators by e-mail. support@lcc.ncbr.muni.cz In message state: > Problem description, command name > User name, machine name > Copy error output from command line Main WOLF cluster administrator: Jakub Štěpán Account management, hardware, system and software administrator Scientific applications (modules) administrator: Petr Kulhánek 0 UNIX and programming 1. lesson First login > Local login > Desktop environment > Standard applications JlXand programming 1. lesson -18- Local login Local terminals: • Six text terminals (Fl... F6) • One graphical terminal (F7, F8,...) • Switching between them by keys Ctrl+Alt+Fl... Ctrl+Alt+F7 Login: • Needed input user name (login) and password Linux operating system is very flexible and enables various ways of local login, for example by ID cards or cryptographic keys. More can be found in PAM (Pluggable Authentication Modules) system manual. $ man 8 pam JlXand programming 1. lesson -19- Local login Text terminal (F1-F6): > Access to CLI - command line interface > Start directory is /home/yourjogin (home directory) > Graphical applications (Xll) can be run only by display export to remote graphical interface > Logout by command exit Graphical terminal (F7): > Runs Xll server and desktop environment in it (KDE, Unity, GNOME, atd.) > Desktop environment can be selected before actual login > Enables direct GUI - graphical user interface applications running > Command line is accessible through special applications > xterm > konsole > Logout using GUI menu in desktop environment. JlXand programming 1. lesson Login - LightDM X manager Desktop environment choice a Login name (Enter) Password (Enter) Default keyboard layout is English (EN). When using numeric keyboard check NumLock. NIX and programming 1. lesson Desktop Environments Unity (menu item Ubuntu) Xfce JlXand programming 1. lesson Standard applications Main menu Results filter Submenu Firefox OpenOffice/LibreOffice Gimp Inkscape Okular web browser text editor (Writer) tab editor (Calc) presentations (Impress) raster graphics editor vector graphics editor PDF documents reader 1. lesson -23- Exercise 1. Login to desktop environment Unity (menu item Ubuntu). Login name is guestXX, where XX is PC number 01 - 23. Password will be given by teacher. 2. Try system applications (Gimp, Libre Office Writer, Inkscape) 3. Try login to other desktop environments (Xfce, Gnome, KDE), try to find application menu in them and run system applications. JlXand programming 1. lesson Password change > Terminals > Command passwd JlXand programming 1. lesson -25- Terminals Command line is accessible on text terminals. In graphics terminal Xll terminal emulator is needed. xterm kulhanek : bash v ■■■■■ X File Edit View Scrollback Bookmarks Settings Help kulhanekjipes: ~$ pvd j\ /home/kulhanek kulhanek@pes:~$ 1 A V common : kwrite H vs-server: kate 0 Ml kulhanek : bash P< Easy, standard on all systems Default directory is: / IIX and programming Command line Prompt - user type ($ regular user, # super user, other prompts %, >) V [kulhanek@wolf ~]$ ^ / I ommanc User name Machine name Current directory (~ is home directory /home/login) Command is given by key Enter. History: by arrow keys (up, down) list of recently used commands can be searched. Any command can be re-used or edited and used. Full list of recorded commands can be printed by command history. Auto complete: Tab key makes command line interpreter to try complete started word. Completed can be command names, paths, file names (if one click does not complete word, there is more possibilities to complete, another click shows list of them). Text copy: Do not use Ctrl+C! Mouse text select automatically adds text to clipboard, press mouse wheel to paste on cursor place. iNIX and programming 1. lesson Password change, command passv > Password can be changed after login to system by command passwd. > Running command passwd asks user for current password, and new password. To avoid typo retype is requested. > Change is automatic for all WOLF cluster computers. > Password needs to be strong enough. It should contain combination of upper, lower case, numbers and other characters. > Type password on main keyboard part, do not use numeric keyboard and special keys. You avoid possible problems with password input. h-4 h-5 hts FLfl Hi FLZ PItSC Z:ZL< Default keyboard is English (EN). JlXand programming 1. lesson -28- Password A valid password should be a mix of upper and lower case letters, digits, and other characters. You can use an 8 character long password with characters from at least 3 of these 4 classes, or a 7 character long password containing characters from all the classes. An upper case letter that begins the password and a digit that ends it do not count towards the number of character classes used. JlXand programming 1. lesson -29- Password change - passwd kulhanek@wolf:~$ passwd Enter login(LDAP) password: No signs appears when writing You can now choose the new password or/passphrase A valid password should be a mix of /pper and lower case letters, digits, and other characters. You /an use an 8 character long password with characters from at l/ast 3 of these 4 classes, or a 7 character long password conta/ning characters from all the classes. An upper case letter tfiat begins the password and a digit that ends it do not county towards the number of character classes used. A passphrase should be of at/ least 3 words, 11 to 40 characters long, and contain enough different characters Alternatively, if no one /else can see your terminal now, you can pick this as your passwgrrd Enter new password: Re-type new password: LDAP password information changed for kulhanek passwd: password updated successfully kulhanek@wolf:~$ JlXand programming 1. lesson -30- Exercise 1. Logout from active session. 2. Login with your log name and start password. 3. Open terminal. 4. Change your password by command passwd. 5. Logout. 6. Login wit your log name and new password. JlXand programming 1. lesson