Example: bankruptcy

The operating system Linux and programming …

The operating system Linuxand programming languagesAn introductionJoachim Puls and Michael WegnerContents:1 General remarks on the operating system UNIX/Linux2 First steps at the computer3 File systems4 Editing and printing text filesMore important commands5 UNIX-shells6 Process administration7 The programming language C++ - an overview8 Fortran 90/95 - an overview9 Creating executable programsAdditional material reference reference Many thanks to Tadziu Hoff-mann for carefully reading the manuscript and 2010, Joachim Puls & Michael Wegner (1st ed.)1 General remarks on the operat-ing system UNIX/LinuxClassification of UNIX/LinuxUNIX is aMulti-User/Multi-Tasking operating systemand exists in many different versions ( derivates ):Solaris, AIX, XENIX, HP-UX, SINIX, programsOperating systemHardwareUserOperating system (OS): Sum of all programs whicharerequired to operate a computerand which controland monitor the application featuresUNIX has been originally w

The operating system Linux and programming languages An introduction Joachim Puls and Michael Wegner Contents: 1 General remarks on the operating system

Tags:

  Linux, Programming, Language, Operating system linux and programming, Operating, System, Operating system linux and programming languages, Operating systems

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of The operating system Linux and programming …

1 The operating system Linuxand programming languagesAn introductionJoachim Puls and Michael WegnerContents:1 General remarks on the operating system UNIX/Linux2 First steps at the computer3 File systems4 Editing and printing text filesMore important commands5 UNIX-shells6 Process administration7 The programming language C++ - an overview8 Fortran 90/95 - an overview9 Creating executable programsAdditional material reference reference Many thanks to Tadziu Hoff-mann for carefully reading the manuscript and 2010, Joachim Puls & Michael Wegner (1st ed.)1 General remarks on the operat-ing system UNIX/LinuxClassification of UNIX/LinuxUNIX is aMulti-User/Multi-Tasking operating systemand exists in many different versions ( derivates ):Solaris, AIX, XENIX, HP-UX, SINIX, programsOperating systemHardwareUserOperating system (OS): Sum of all programs whicharerequired to operate a computerand which controland monitor the application featuresUNIX has been originally written in the programminglanguage C, and is therefore a classical platformfor C-programs.

2 UNIX contains well suited en-vironments for program development (C, C++,Java, Fortran, ..). is mainly used for scientific-technical applicationson mainframes and workstations, but has be-come, because ofLinux, also popular for classicalPC-applications throughout the last years. is perfectly suited for application in systems and networks require an admin-istrator. offers various alternatives for the solution of mosttasks. The multitude of commands (more thanin any other OS) are brief and flexible. is originally command-line oriented, but can beused via a graphical user interface (X Windowsystem).Linuxis available (also via internet) in differentdis-tributions( , Fedora, Debian etc.)

3 Mean-while there is a variety ofdirect-start (live) systems,which can be started, without installation, directlyfrom CD or other bootable storage devices (Knop-pix, Ubuntu, .. ). There are also interesting miniversions (<100 MB) designed for a start from USB-sticks ( , Puppy). The source code of Linux is Peek, J., et al.:Unix Power Reilly Media 2002 (3rd edition). Gilly, D., et al.:UNIX in a Reilly, K oln. 1998 (1st edition). Wielsch,M.:Das gro e Buch zu Becker, D usseldorf. 1994 (1st edition). and numerous other text books online- First steps at the computerUser, logon, logoffSince UNIX is amulti-useroperating system , it candeal with several users simultaneously.

4 Each userneeds auser user has a personal environment (home di-rectory, shell), which can be accessed only by her-/himself (and by the system adminstrator and thosepeople who know the password legitimate or byhacking).Inside the system the user is identified by hisuser ID(UID) and his group identity (group ID, GID).There are two user types: normal users withrestrictedrights and the system administrator (root) with all latter is responsible for the installation, con-figuration and maintenance of the system as wellas the user user has to logon and to logoff from the system (login/logout). Each user account is protected by :Login to the system with your user account!

5 4 Graphical user interfaceOriginally, UNIX is command-line oriented. TheXWindow systemenables convenient interaction via awindow-oriented graphical interface, similar to manageris responsible for the manage-ment and display of the individual windows. Eachwindow manager (and there are a variety of such man-agers) can be distinguished by its ownLook and Feel(appearance of window decorations and control de-vices etc.). Most window managers can be choosenat the for simple window managers: twm: very simple and resource-saving mwm: Motif window manager, more common andmore advanced xfce: convenient, simple, and resource-saving(recommended for use in virtual machines)Moreover, almost all Linux distributions providegraphicaldesktop environmentssuch asKDEorGNOME, which have a functionality far beyond simplewindow :xterm [options]Though there is a graphical interface, UNIX needsthe possibility for direct command input for practicaluse.

6 Therefore, at least one terminal window needsto be open. This can be accomplished via the windowmanager or the desktop environment ( console )More windows can then be opened with the , all UNIX commands have a variety ofop-tions, which usually begin with-. For the commandswhich will be introduced in the following, we will pro-vide only the most important :wegner@arber:~ >xterm -geo 80x40 -fn 10x20 The commandxtermis called with two options-geo,-fn, which, in this case, need additionalarguments(width and height of window, font name & size).Exercise:1. Open a terminal window ( terminal program ) via From there, start anotherxterm!6commandmanSyntax:man commandman -k expressiondisplays the manual pages ( man pages ) for the -ksearches for man pages contain-ing theexpressionin theNAME section.

7 A man pageusually consists of the following sections NAME command and purpose SYNOPSIS syntax of command DESCRIPTIONof command effect FILES which are modified and/or needed OPTIONSif present EXAMPLE(S)for application (rarely) BUGS errors, if known SEE ALSO other commands in the same contextExercise:Display information about the commandxterm!7commandpasswdSyntax:passwd sets a new should be constructed from a combinationof letters, digits and special characters, and shouldnot appear in any dictionary or similar list. Otherwise,the password can be hacked by systematic search command to set/change the password andthe required conventions (length, number of dig-its/letters/special characters) can vary from systemto system .

8 The following example is a common one, , valid for the workstations at the CIP Pool (butnot for the workstations of the USM).Example:wegner@arber:~ >passwdChanging password for wegnerOld password:myoldpasswdEnter the new password(minimum of 5, maximum of 8 characters)Please use a combinationof upper and lower case letters and password:mynewpasswdRe-enter new password:mynewpasswdPassword :----> Ihr neues Passwort ist in 5 Minutenim gesamten Pool aktiv! <-----Connection to @arber:~ >9commandwho, whoamiSyntax:whowhoamiwhodisplays information about all users which arelogged into the system user name, terminal where the corresponding user is working, time of :wegner@arber:~ >whoamiarber!

9 Wegner pts/5 Oct 20 12:4510 Working at external terminalsTo login to a distant host, one has to provide thecorresponding IP address, either numerical or as thecomplete host In local networks(CIP-Pool), the brief host name (without domain) issufficient. To establish the connection and to encryptthe transmitted data, one should use exclusively theso-called secure commands. Avoidftpand usesftpinstead. Withftp, even the password isnotencoded!commandsshSyntax:ssh (-4) -X -l username hostnamessh (-4) -X username@hostnameEnables logging in to an arbitrary host which can belocated via an IP address (if one knows the user ac-count and the password).

10 Logoff withexit, case, the option-4(without brackets) forces anIPv4 connection (if IPv6 is not working)Example:wegner@arber:~ >ssh -X -l wegner :mypasswdLast login: Sun Oct 22 ..**Mitteilungen**wegner@lxsrv1:~ > logoutConnection to (if connection within own cluster)Example:wegner@arber:~ >ssh -X wegner@arberLast login: Sun Oct 22 ..etc. (keine Passwort-Abfrage)An additional advantage of thesecure shellis thatthe distant hosthostnamecan display X applicationson the local terminal, without requiring the commandxhost(as in earlier times). For certain hosts, the com-mandsshrequires the option-Xto enable this copy files from one host to another, the commandscp( secure copy ) is used, see :scp (-4) file1 username@hostname:file2scp (-4) username@hostname:file1 file2 The first command copies the local filefile1to theexternal host under namefile2, the second commandvice versa.


Related search queries