General Remarks on the Operating System UNIX/Linux

Total Page:16

File Type:pdf, Size:1020Kb

General Remarks on the Operating System UNIX/Linux Contents: 1 General remarks on the operating system UNIX/Linux 2 First steps at the computer 3 File systems 4 Editing and printing text files The operating system Linux More important commands 5 UNIX-shells and programming languages 6 Process administration 7 The programming language C++ - an overview An introduction 8 Fortran 90/95 - an overview 9 Creating executable programs Joachim Puls and Michael Wegner Additional material • vi basics: vi brief.pdf • reference for vi: vi reference.pdf • reference for emacs: emacs reference.pdf Acknowledgements. Many thanks to Tadziu Hoff- mann for carefully reading the manuscript and useful comments. c 2010, Joachim Puls & Michael Wegner (1st ed.) 1 General remarks on the operat- Essential features ing system UNIX/Linux UNIX • has been originally written in the programming Classification of UNIX/Linux language C, and is therefore a classical platform for C-programs. UNIX contains well suited en- UNIX is a Multi-User/Multi-Tasking operating system vironments for program development (C, C++, and exists in many different versions (“derivates”): Java, Fortran, ...). Solaris, AIX, XENIX, HP-UX, SINIX, Linux. • is mainly used for scientific-technical applications on mainframes and workstations, but has be- User come, because of Linux, also popular for classical PC-applications throughout the last years. • is perfectly suited for application in networks. Larger systems and networks require an admin- istrator. • offers various alternatives for the solution of most tasks. The multitude of commands (more than in any other OS) are brief and flexible. Hardware • is originally command-line oriented, but can be used via a graphical user interface (X Window system). Operating system Linux is available (also via internet) in different dis- application programs tributions (S.u.S.E., Fedora, Debian etc.). Mean- while there is a variety of direct-start (live) systems, which can be started, without installation, directly from CD or other bootable storage devices (Knop- Operating system (OS): Sum of all programs which pix, Ubuntu, ...). There are also interesting “mini are required to operate a computer and which control versions” (<100 MB) designed for a start from USB- and monitor the application programs. sticks (e.g., Puppy). The source code of Linux is free. 1 2 Literature 2 First steps at the computer • Peek, J., et al.: Unix Power Tools. User, logon, logoff O’Reilly Media 2002 (3rd edition). Since UNIX is a multi-user operating system, it can deal with several users simultaneously. Each user • Gilly, D., et al.: UNIX in a Nutshell. needs a user account. O’Reilly, K¨oln. 1998 (1st edition). Each user has a personal environment (home di- rectory, shell), which can be accessed only by her- • Wielsch,M.: Das große Buch zu UNIX. /himself (and by the system adminstrator and those Data Becker, D¨usseldorf. 1994 (1st edition). people who know the password – legitimate or by hacking). Inside the system the user is identified by his user ID • and numerous other text books (UID) and his group identity (group ID, GID). • online-tutorial There are two user types: http://www.ee.surrey.ac.uk/Teaching/Unix • ‘normal’ users with restricted rights and the • system administrator (root) with all privileges. The latter is responsible for the installation, con- figuration and maintenance of the system as well as the user administration. Each user has to logon and to logoff from the system (login/logout). Each user account is protected by a password. Exercise: Login to the system with your user account! 3 4 Graphical user interface command xterm Originally, UNIX is command-line oriented. The X Window system enables convenient interaction via a Syntax: window-oriented graphical interface, similar to other OS. xterm [options] The window manager is responsible for the manage- Though there is a graphical interface, UNIX needs ment and display of the individual windows. Each the possibility for direct command input for practical window manager (and there are a variety of such man- use. Therefore, at least one terminal window needs agers) can be distinguished by its own Look and Feel to be open. This can be accomplished via the window (appearance of window decorations and control de- manager or the desktop environment (‘console’) vices etc.). Most window managers can be choosen at the login-menu. More windows can then be opened with the command xterm. Examples for simple window managers: Generally, all UNIX commands have a variety of op- • twm: very simple and resource-saving tions, which usually begin with -. For the commands which will be introduced in the following, we will pro- • mwm: Motif window manager, more common and vide only the most important ones. more advanced Example: • xfce: convenient, simple, and resource-saving (recommended for use in virtual machines) wegner@arber:~ > xterm -geo 80x40 -fn 10x20 The command xterm is called with two options -geo, Moreover, almost all Linux distributions provide -fn, which, in this case, need additional arguments graphical desktop environments such as KDE or (width and height of window, font name & size). GNOME, which have a functionality far beyond simple window managers. Exercise: 1. Open a terminal window (“terminal program”) via KDE. 2. From there, start another xterm! 5 6 command man command passwd Syntax: Syntax: man command passwd man -k expression sets a new password. displays the manual pages (“man pages”) for the pro- Passwords should be constructed from a combination vided command. man -k searches for man pages contain- of letters, digits and special characters, and should ing the expression in the NAME section. A man page not appear in any dictionary or similar list. Otherwise, usually consists of the following sections the password can be hacked by systematic search al- gorithms. • NAME command and purpose The command to set/change the password and • SYNOPSIS syntax of command the required conventions (length, number of dig- its/letters/special characters) can vary from system to system. The following example is a common one, • DESCRIPTION of command effect e.g., valid for the workstations at the CIP Pool (but not for the workstations of the USM). • FILES which are modified and/or needed Example: • OPTIONS if present wegner@arber:~ > passwd • EXAMPLE(S) for application (rarely) Changing password for wegner Old password: myoldpasswd • BUGS errors, if known Enter the new password (minimum of 5, maximum of 8 characters) • SEE ALSO other commands in the same context Please use a combination of upper and lower case letters and numbers. New password: mynewpasswd Exercise: Re-enter new password: mynewpasswd Display information about the command xterm! Password changed. 7 8 Example: command who, whoami ----> Ihr neues Passwort ist in 5 Minuten Syntax: im gesamten Pool aktiv! <----- Connection to 141.84.136.1 closed. wegner@arber:~ > who whoami who displays information about all users which are logged into the system • user name, • terminal where the corresponding user is working, • time of login. whoami is self-explanatory. Example: wegner@arber:~ > whoami arber!wegner pts/5 Oct 20 12:45 9 10 Working at external terminals OR (if connection within “own” cluster) To login to a distant host, one has to provide the corresponding IP address, either numerical or as the Example: complete host name name.domain. In local networks (CIP-Pool), the brief host name (without domain) is wegner@arber:~ > ssh -X wegner@arber sufficient. To establish the connection and to encrypt Last login: Sun Oct 22 ... the transmitted data, one should use exclusively the etc. (keine Passwort-Abfrage) so-called “secure” commands. Avoid ftp and use sftp instead. With ftp, even the password is not encoded! An additional advantage of the secure shell is that command ssh the distant host hostname can display X applications on the local terminal, without requiring the command xhost (as in earlier times). For certain hosts, the com- Syntax: mand ssh requires the option -X to enable this feature. ssh (-4) -X -l username hostname ssh (-4) -X username@hostname Enables logging in to an arbitrary host which can be located via an IP address (if one knows the user ac- count and the password). Logoff with exit, Ctrl-D or command scp logout. In case, the option -4 (without brackets) forces an To copy files from one host to another, the command IPv4 connection (if IPv6 is not working) scp (“secure copy”) is used, see also cp. Example: Syntax: wegner@arber:~ > ssh -X -l wegner lxsrv1.lrz-muenchen.de Password: mypasswd scp (-4) file1 username@hostname:file2 Last login: Sun Oct 22 ... scp (-4) username@hostname:file1 file2 ********************* Mitteilungen The first command copies the local file file1 to the ********************* external host under name file2, the second command wegner@lxsrv1:~ > logout vice versa. Note the colon! scp -r enables to copy Connection to lxsrv1.lrz-muenchen.de closed. complete directories recursively, compare cp -r. 11 12 3 File systems Avoid characters which might be interpreted by the shell in a special way. Logics, file types A file can be referenced within the file tree by either “In UNIX everything is a file.” an absolute or a relative path name. An absolute path name consists of all directories leading to the file and The following file-system objects can be found the file name, and always begins with a / (the root directory). • ‘normal’ (text-) files In many shells and application programs, the tilde de- • executable files (binary files or shell scripts) notes the home directory. • directories • device files • pipes command pwd • symbolic or hard links (references to files) Syntax: All files and file system objects are ordered within a hierarchical file tree with exactly one root directory pwd ‘/’. displays the current directory. In contrast to the MS-Windows file system, the UNIX file system does not distinguish between dif- Example: ferent drives. All physical devices (hard disks, DVD, CDROM, USB, floppy) are denoted by specific files inside a certain directory within the file tree (usually wegner@arber:~ > pwd within /dev).
Recommended publications
  • Backbox Penetration Testing Never Looked So Lovely
    DISTROHOPPER DISTROHOPPER Our pick of the latest releases will whet your appetite for new Linux distributions. Picaros Diego Linux for children. here are a few distributions aimed at children: Doudou springs to mind, Tand there’s also Sugar on a Stick. Both of these are based on the idea that you need to protect children from the complexities of the computer (and protect the computer from the children). Picaros Diego is different. There’s nothing stripped- down or shielded from view. Instead, it’s a normal Linux distro with a brighter, more kid-friendly interface. The desktop wallpaper perhaps best We were too busy playing Secret Mario on Picaros Diego to write a witty or interesting caption. exemplifies this. On one hand, it’s a colourful cartoon image designed to interest young file manager. In the programming category, little young for a system like this, but the it children. Some of the images on the we were slightly disappointed to discover it may well work for children on the upper end landscape are icons for games, and this only had Gambas (a Visual Basic-like of that age range. should encourage children to investigate the language), and not more popular teaching Overall, we like the philosophy of wrapping system rather than just relying on menus. languages like Scratch or a Python IDE. Linux is a child-friendly package, but not On the other hand, it still displays technical However, it’s based on Debian, so you do dumbing it down. Picaros Diego won’t work details such as the CPU usage and the RAM have the full range of software available for every child, but if you have a budding and Swap availability.
    [Show full text]
  • Read PDF Linux-Distribusjoner: Ubuntu, Fedora
    [PDF] Linux-distribusjoner: Ubuntu, Fedora, Slackware, Mandriva Linux, Splashtop, Kubuntu, Debian, Mark Shuttleworth, Linux Mint, Gobuntu Linux-distribusjoner: Ubuntu, Fedora, Slackware, Mandriva Linux, Splashtop, Kubuntu, Debian, Mark Shuttleworth, Linux Mint, Gobuntu Book Review Absolutely one of the best pdf We have ever read. I really could comprehended every little thing using this written e book. I am easily could get a satisfaction of reading a written publication. (Dr. Od ie Ham ill) LINUX-DISTRIBUSJONER: UBUNTU, FEDORA , SLA CKWA RE, MA NDRIVA LINUX, SPLA SHTOP, KUBUNTU, DEBIA N, MA RK SHUTTLEW ORTH, LINUX MINT, GOBUNTU - To read Linux - distribusjoner: Ubuntu, Fedora, Slackware, Mandriva Linux , Splashtop, Kubuntu, Debian, Mark Shuttleworth, Linux Mint, Gobuntu PDF, you should follow the hyperlink beneath and save the ebook or gain access to other information which are highly relevant to Linux-distribusjoner: Ubuntu, Fedora, Slackware, Mandriva Linux, Splashtop, Kubuntu, Debian, Mark Shuttleworth, Linux Mint, Gobuntu book. » Download Linux -distribusjoner: Ubuntu, Fedora, Slackware, Mandriva Linux , Splashtop, Kubuntu, Debian, Mark Shuttleworth, Linux Mint, Gobuntu PDF « Our solutions was launched using a want to serve as a total on the internet electronic digital catalogue which offers usage of multitude of PDF document collection. You may find many different types of e-book along with other literatures from the paperwork database. Particular popular issues that distributed on our catalog are famous books, answer key, exam test questions and answer, guide example, practice guideline, quiz trial, customer manual, user guide, service instruction, maintenance manual, and so forth. All e-book all privileges remain together with the writers, and downloads come as is.
    [Show full text]
  • The Linux Kernel Module Programming Guide
    The Linux Kernel Module Programming Guide Peter Jay Salzman Michael Burian Ori Pomerantz Copyright © 2001 Peter Jay Salzman 2007−05−18 ver 2.6.4 The Linux Kernel Module Programming Guide is a free book; you may reproduce and/or modify it under the terms of the Open Software License, version 1.1. You can obtain a copy of this license at http://opensource.org/licenses/osl.php. This book is distributed in the hope it will be useful, but without any warranty, without even the implied warranty of merchantability or fitness for a particular purpose. The author encourages wide distribution of this book for personal or commercial use, provided the above copyright notice remains intact and the method adheres to the provisions of the Open Software License. In summary, you may copy and distribute this book free of charge or for a profit. No explicit permission is required from the author for reproduction of this book in any medium, physical or electronic. Derivative works and translations of this document must be placed under the Open Software License, and the original copyright notice must remain intact. If you have contributed new material to this book, you must make the material and source code available for your revisions. Please make revisions and updates available directly to the document maintainer, Peter Jay Salzman <[email protected]>. This will allow for the merging of updates and provide consistent revisions to the Linux community. If you publish or distribute this book commercially, donations, royalties, and/or printed copies are greatly appreciated by the author and the Linux Documentation Project (LDP).
    [Show full text]
  • Xenix* 286 Installation and Configuration Guide
    XENIX* 286 INSTALLATION AND CONFIGURATION GUIDE *XENIX is a trademark of Microsoft Corporation. Copyright@ 1984, Intel Corporation Intel Corporation, 3065 Bowers Avenue. Santa Clara, California 95051 Order Number: 174386-001 XENIX* 286 INSTALLATION AND CONFIGURATION GUIDE Order Number: 174386-001 *XENIX is a trademark of Microsoft Corporation Copyright @ 1984 Intel Corporation I Intel Corporation, 3065 Bowers Avenue, Santa Clara, California 95051 I The information in this document is subject to change without notice. Intel Corporation makes no warranty of any kind with regard to this material, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. Intel Corporation assumes no responsibility for any errors that may appear in this document. Intel Corporation makes no commitment to update or to keep current the information contained in this document. Intel Corporation assumes no responsibility for the use of any circuitry other than circuitry embodied in an Intel product. No other circuit patent licenses are implied. Intel software products are copyrighted by and shall remain the property oflntel Corporation. Use, duplication or disclosure is subject to restrictions stated in Intel's software license, or as defined in ASPR 7-104.9 (a) (9). No part of this document may be copied or reproduced in any form or by any means without prior written consent of Intel Corporation. The following are trademarks of Intel Corporation and its affiliates and may be used only to identify Intel products: BITBUS im iRMX OpenNET COMMputer iMDDX iSBC Plug-A-Bubble CREDIT iMMX iSBX PROMPT I Data Pipeline Insite iSDM Promware Genius intel iSXM QUEST t::t.
    [Show full text]
  • Android Operating System
    Software Engineering ISSN: 2229-4007 & ISSN: 2229-4015, Volume 3, Issue 1, 2012, pp.-10-13. Available online at http://www.bioinfo.in/contents.php?id=76 ANDROID OPERATING SYSTEM NIMODIA C. AND DESHMUKH H.R. Babasaheb Naik College of Engineering, Pusad, MS, India. *Corresponding Author: Email- [email protected], [email protected] Received: February 21, 2012; Accepted: March 15, 2012 Abstract- Android is a software stack for mobile devices that includes an operating system, middleware and key applications. Android, an open source mobile device platform based on the Linux operating system. It has application Framework,enhanced graphics, integrated web browser, relational database, media support, LibWebCore web browser, wide variety of connectivity and much more applications. Android relies on Linux version 2.6 for core system services such as security, memory management, process management, network stack, and driver model. Architecture of Android consist of Applications. Linux kernel, libraries, application framework, Android Runtime. All applications are written using the Java programming language. Android mobile phone platform is going to be more secure than Apple’s iPhone or any other device in the long run. Keywords- 3G, Dalvik Virtual Machine, EGPRS, LiMo, Open Handset Alliance, SQLite, WCDMA/HSUPA Citation: Nimodia C. and Deshmukh H.R. (2012) Android Operating System. Software Engineering, ISSN: 2229-4007 & ISSN: 2229-4015, Volume 3, Issue 1, pp.-10-13. Copyright: Copyright©2012 Nimodia C. and Deshmukh H.R. This is an open-access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
    [Show full text]
  • Ethereal Developer's Guide Draft 0.0.2 (15684) for Ethereal 0.10.11
    Ethereal Developer's Guide Draft 0.0.2 (15684) for Ethereal 0.10.11 Ulf Lamping, Ethereal Developer's Guide: Draft 0.0.2 (15684) for Ethere- al 0.10.11 by Ulf Lamping Copyright © 2004-2005 Ulf Lamping Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or any later version published by the Free Software Foundation. All logos and trademarks in this document are property of their respective owner. Table of Contents Preface .............................................................................................................................. vii 1. Foreword ............................................................................................................... vii 2. Who should read this document? ............................................................................... viii 3. Acknowledgements ................................................................................................... ix 4. About this document .................................................................................................. x 5. Where to get the latest copy of this document? ............................................................... xi 6. Providing feedback about this document ...................................................................... xii I. Ethereal Build Environment ................................................................................................14 1. Introduction .............................................................................................................15
    [Show full text]
  • A.5.1. Linux Programming and the GNU Toolchain
    Making the Transition to Linux A Guide to the Linux Command Line Interface for Students Joshua Glatt Making the Transition to Linux: A Guide to the Linux Command Line Interface for Students Joshua Glatt Copyright © 2008 Joshua Glatt Revision History Revision 1.31 14 Sept 2008 jg Various small but useful changes, preparing to revise section on vi Revision 1.30 10 Sept 2008 jg Revised further reading and suggestions, other revisions Revision 1.20 27 Aug 2008 jg Revised first chapter, other revisions Revision 1.10 20 Aug 2008 jg First major revision Revision 1.00 11 Aug 2008 jg First official release (w00t) Revision 0.95 06 Aug 2008 jg Second beta release Revision 0.90 01 Aug 2008 jg First beta release License This document is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License [http:// creativecommons.org/licenses/by-nc-sa/3.0/us/]. Legal Notice This document is distributed in the hope that it will be useful, but it is provided “as is” without express or implied warranty of any kind; without even the implied warranties of merchantability or fitness for a particular purpose. Although the author makes every effort to make this document as complete and as accurate as possible, the author assumes no responsibility for errors or omissions, nor does the author assume any liability whatsoever for incidental or consequential damages in connection with or arising out of the use of the information contained in this document. The author provides links to external websites for informational purposes only and is not responsible for the content of those websites.
    [Show full text]
  • Marjn Norling November 2012
    Mar$n Norling November 2012 UNIX Lecture Goals • Goal 1: Know basic UNIX commands and their use from memory. • Goal 2: Know how to find informaon on more advanced UNIX commands and their use. • Goal 3: Understand the basics of regular expression paerns. • Goal 4: Know the basic loops and condi$onals for shell scrip$ng and understand how to use them. UNIX Schedule Thursday Friday 09.00-09.45 UNIX introduc$on 09.00-09.45 Bash Scrip$ng 10.00-10.45 UNIX basics 10.00-10.45 Tutorial: Bash scrip$ng 11.00-12.00 Redirects to regexp 11.00-12.00 Tips & Quesons 12.00-13.00 Lunch 12.00-13.00 Lunch 13.00-16.00 Tutorial: Basics 13.00-16.00 Tutorial: finishing up UNIX HISTORY UNIX History • 1969 – First Version of UNIX developed at Bell Labs by AT&T • 1975 – UNIX 6, the first to be widely available outside Bell Labs. The first “Berkeley So]ware Distribu$on” (BSD) is released. • 1989 – UNIX System V, the last tradi$onal UNIX version. • 1991 – Linus Torvalds begin developing Linux. “UNIX-like” • Today – UNIX itself, what’s now called “tradi$onal UNIX” is not used, except by enthusiasts. • There are many “UNIX-like” systems (also known as *nix or UN*X) that are similar to UNIX while not conforming to the Single UNIX Specificaon. • In fact, most operang systems today except windows are “UNIX like”. Single UNIX Specificaon (SUS) • Developed and maintained by the Aus$n Group, based on earlier work by the IEee and The Open Group.
    [Show full text]
  • Wetek Tutorial
    Tutorial 2014_v1 How to install OpenELEC on WeTek Play Prerequisites: ● WeTek Play ● Micro SD (minimum 4 GB) ● PC/Mac Introduction: WeTek Play is Android TV device, which beside of Android, support booting of Linux based XBMC and OpenELEC from NAND flash and Micro SD too. Basically, if you are going to install Linux XBMC or OpenELEC to MicroSD, it means that you can always have Android running on NAND flash, and Linux XBMC or OpenELEC running from MicroSD. Software and Tools: • OpenELEC for WeTek Play - http://goo.gl/NgFSOM • Win32 Disk Imagger - http://sourceforge.net/projects/win32diskimager/ Installation: 1. Download OpenELEC for WeTek from link above 2. When file wetek-openelec.ar.bz2 is downloaded, extract it with Winrar or 7-Zip, and keep in mind location where you extracted this archive. 3. Insert Micro SD in PC or Notebook 4. Download and Install Win32 Disk Imager application, then run it as Administrator. (Right-click on app icon and select Run as Administrator) Note: After installation Win32 Disk Imager application is located at: Windows 64 bit: C:\Program Files (x86)\ImageWriter Windows 32 bit: C:\Program Files\ImageWriter 5. Click on blue Folder icon and browse for wetek-openelec folder, where inside you will find .img file, and select it. 6. Now, you should select from Devices dropdown menu, letter which represents inserted Micro SD card. 7. Once when You selected Micro SD card, click on Write, confirm everything what Image Wrier may ask you and wait that application burn .img file to Micro SD. 8. Once when burning process is done, remove Micro SD from PC, and insert it in WeTek Play 9.
    [Show full text]
  • C168H/PCI 8-Port RS-232 PCI Boards
    Multiport Serial Boards C168H/PCI 8-port RS-232 PCI boards › 8-port RS-232 high-speed communication board › Compact PCI board size › Versatile OS driver support › Various connection options › Data transmission speed up to 921.6 Kbps › On-chip hardware flow control › Easy configuration without switches or jumpers › Convenient connection cables Overview The Smartio C168H/PCI Series allows you to install additional RS- And C168H/PCI’s versatile OS driver support truly fulfills the needs 232 serial communication ports on your PC by providing 8 serial of our customers’ varied applications. This product is available for ports per board for connecting all types of serial devices, including use on either a PCI bus, with both types offering a reliable and high terminals, modems, printers, data acquisition equipment, and more. performance solution for serial multiport communications. Specifications Hardware DOS, AT&T UNIV SVR4.2, MITUX DVR4.2, UnixWare SVR4.2, I/O Controller: 16C550C or compatible x 8 UnixWare7, SCO OpenServer, SCO Unix, SCO XENIX, QNX 4.2x, Bus: PCI ver. 2.1 (32-bit) FreeBSD Serial Interface Physical Charateristics Maximum No. of Ports: 32 (4 boards) Dimensions: 123 x 100 mm (W x D) Performance Environmental Limits Speed: 50 bps to 921.6 Kbps Operating Temperature: 0 to 55°C Serial Communication Parameters Storage Temperature: -20 to 85°C Data Bits: 5, 6, 7, 8 Ambient Relative Humidity: 5 to 95% RH Stop Bits: 1, 1.5, 2 Standards and Certifications Parity: None, Even, Odd, Space, Mark Regulatory Approvals: FCC, CE I/O Address:
    [Show full text]
  • Hands on #1 Overview
    Hands On #1 ercises Overview See Wednesday’ s hands on Part Where1 : Starting is your andinstallation familiarizing ? Getting the example programs Running novice examples : N01, N03, N02 … Part Examine2 : Looking cross into sections Geant4, trying it out with ex Simulate depth dose curve Compute and plot Bragg curve Addenda : other examples, histogramming Your Geant4 installation VMware Player users under Windows or Mac OS all files downloaded from http://geant4.in2p3.fr/cenbg/vmware.html in principle, no installation needed all your peripherals should be operational (WiFi, disks,…) Installation from beginning CERN link http://geant4.web.cern.ch/geant4/support/download.shtml SLAC link http://geant4.slac.stanford.edu/installation/ User forum http://geant4-hn.slac.stanford.edu:5090/HyperNews/public/get/installconfig.html Installation guide http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html This Hands On will help you check your installation of Geant4 is correct If not, we can try to help during this Hands On… Access your Geant4 installation for VMware users Start the VMware player software Start your VMware machine Log onto the VMware machine Username: local1 , password: local1 Open a terminal (right click on desktop with mouse) You are now working under Scientific Linux 4.2 with gcc 3.4.4 By default on your Windows PC, the directory /mnt/hgfs/echanges is a link to C:\ Tips for VMware users (1/2) Geant4 8.3 installation path : /usr/local/geant4 you need root privileges
    [Show full text]
  • Source Level Debugging GDB: Gnu Debugger Starting/Exiting GDB Stopping and Continuing the Execution of Your Program In
    Source Level Debugging GDB: Gnu DeBugger ● A source level debugger has a number of useful features that facilitates debugging problems ● GDB is a line oriented debugger where actions associated with executing your program. are issued by typing in commands. ● You have to create symbolic table information ● It can be invoked for executables compiled by within the executable by using the -g option when gcc or g++ with the -g option. compiling with gcc or g++. ● General capabilities: ● This symbolic table information includes the correspondances between – Starting/exiting your program from the debugger. – Stopping and continuing the execution of your – statements in the source code and locations of instructions program. in the executable – Examining the state of your program. – variables in the source code and locations in the data areas of the executable – Changing state in your program. Starting/Exiting GDB Stopping and Continuing the ● Bring up the gdb debugger by typing: Execution of Your Program in GDB gdb executable_name ● Setting and deleting breakpoints. ● Initiate your executable by using the command: run [command-line arguments] ● Execution stepping and continuing. – Command line arguments can include anything that would normally appear after the executable name on the command line. ● run-time options, filenames, I/O redirection, etc. – When no arguments are specified, then gdb uses the arguments specified for the previous run command during the current gdb session. ● Exit the gdb debugger by typing: quit Setting and Deleting Breakpoints Examples of Setting and Deleting Breakpoints ● Can set a breakpoint to stop: – at a particular source line number or function (gdb) break # sets breakpoint at current line # number – when a specified condition occurs (gdb) break 74 # sets breakpoint at line 74 in the # current file ● General form.
    [Show full text]