1 Get Started

Total Page:16

File Type:pdf, Size:1020Kb

1 Get Started Outline • Working with the shell Get Started – Basic file operations – Editing command lines – System info/settings IT244 - Introduction to Linux / Unix – Help and documents Instructor: Bo Sheng Everything is case sensitive 1 2 Basic File Operations Basic File Operations • List files ( ls ) • Change directory ( cd ) – ls – cd / – pwd (print working directory) – ls – ls / – pwd – ls /home (see your username?) – cd /home/your username/it244 – ls /home/shengbo/it244 – ls – pwd 3 4 Basic File Operations Basic File Operations • Read files ( cat ) • Write/create files ( echo ) – cat /home/shengbo/it244/welcome – ls – cat /var/run/motd.dynamic – echo “hello world” > hello – Some files are not readable (e.g., binary) – ls • cat /bin/cat – cat hello – echo “I am your name” >> hello – cat hello – cat hello hello 5 6 1 Basic File Operations Editing Command Lines • Execute files • Delete a char – /home/shengbo/it244/exetest – “backspace” and “delete” – Abort execution • Delete a word ( CTRL+W ) • CTRL+C • Delete a line ( CTRL+U ) • CTRL+Z and kill – /home/shengbo/it244/exetest – CTRL+Z – jobs • Arrow keys – kill %1 – Up / down: browse the command history – jobs – Left / right: move the cursor 7 8 System info/settings Practice – ls • Which shell we are using? – pwd – ps – ls / – ls /home • What OS is running? – uname – cd / • Something you can’t do (su/sudo) – ls – pwd – Try to create a file under / – cd /home/your username/it244 – pwd 9 10 Practice Help and Documents – echo “hello world” > hello – ls • --help option – cat hello • System manuals ( man ) – echo “I am your name” >> hello – cat hello – man ls – cat hello hello – man cat – man ssh – /home/shengbo/it244/exetest – man man – Press ctrl+c – /home/shengbo/it244/exetest – CTRL+Z – jobs – kill %1 – jobs 11 12 2 Help and Documents • --help option • System manuals ( man ) – man ls – man cat – man ssh – man man • Reading long manuals – Press ENTER, SPACE, and Q 13 14 Help and Documents Summary • GNU info / pinfo (menu display) • File operations – info ls – ls, pwd, cd, cat, echo – info cat – CTRL+C, CTRL+Z, kill, jobs – info info – Control+h • System info ps, uname • Search Keyword – – man –k – apropos • Help and documents – man, info, apropos, whatis – whatis 15 16 Questions • Use man and info to read the manual of ls and find out how to distinguish files from directories. • uname can display a lot more system information. Find a way to display the OS “kernel name” and “kernel release”. 17 3.
Recommended publications
  • UNIX Workshop Series: Quick-Start Objectives
    Part I UNIX Workshop Series: Quick-Start Objectives Overview – Connecting with ssh Command Window Anatomy Command Structure Command Examples Getting Help Files and Directories Wildcards, Redirection and Pipe Create and edit files Overview Connecting with ssh Open a Terminal program Mac: Applications > Utilities > Terminal ssh –Y [email protected] Linux: In local shell ssh –Y [email protected] Windows: Start Xming and PuTTY Create a saved session for the remote host name centos.css.udel.edu using username Connecting with ssh First time you connect Unix Basics Multi-user Case-sensitive Bash shell, command-line Commands Command Window Anatomy Title bar Click in the title bar to bring the window to the front and make it active. Command Window Anatomy Login banner Appears as the first line of a login shell. Command Window Anatomy Prompts Appears at the beginning of a line and usually ends in $. Command Window Anatomy Command input Place to type commands, which may have options and/or arguments. Command Window Anatomy Command output Place for command response, which may be many lines long. Command Window Anatomy Input cursor Typed text will appear at the cursor location. Command Window Anatomy Scroll Bar Will appear as needed when there are more lines than fit in the window. Command Window Anatomy Resize Handle Use the mouse to change the window size from the default 80x24. Command Structure command [arguments] Commands are made up of the actual command and its arguments. command -options [arguments] The arguments are further broken down into the command options which are single letters prefixed by a “-” and other arguments that identify data for the command.
    [Show full text]
  • CIS 90 - Lesson 2
    CIS 90 - Lesson 2 Lesson Module Status • Slides - draft • Properties - done • Flash cards - NA • First minute quiz - done • Web calendar summary - done • Web book pages - gillay done • Commands - done • Lab tested – done • Print latest class roster - na • Opus accounts created for students submitting Lab 1 - • CCC Confer room whiteboard – done • Check that headset is charged - done • Backup headset charged - done • Backup slides, CCC info, handouts on flash drive - done 1 CIS 90 - Lesson 2 [ ] Has the phone bridge been added? [ ] Is recording on? [ ] Does the phone bridge have the mike? [ ] Share slides, putty, VB, eko and Chrome [ ] Disable spelling on PowerPoint 2 CIS 90 - Lesson 2 Instructor: Rich Simms Dial-in: 888-450-4821 Passcode: 761867 Emanuel Tanner Merrick Quinton Christopher Zachary Bobby Craig Jeff Yu-Chen Greg L Tommy Eric Dan M Geoffrey Marisol Jason P David Josh ? ? ? ? Leobardo Gabriel Jesse Tajvia Daniel W Jason W Terry? James? Glenn? Aroshani? ? ? ? ? ? ? = need to add (with add code) to enroll in Ken? Luis? Arturo? Greg M? Ian? this course Email me ([email protected]) a relatively current photo of your face for 3 points extra credit CIS 90 - Lesson 2 First Minute Quiz Please close your books, notes, lesson materials, forum and answer these questions in the order shown: 1. What command shows the other users logged in to the computer? 2. What is the lowest level, inner-most component of a UNIX/Linux Operating System called? 3. What part of UNIX/Linux is both a user interface and a programming language? email answers to: [email protected] 4 CIS 90 - Lesson 2 Commands Objectives Agenda • Understand how the UNIX login • Quiz operation works.
    [Show full text]
  • Penndot Form MV-409
    MV-409 (3-18) www.dmv.pa.gov APPLICATION FOR CERTIFICATION OF For Department Use Only BureauP.O. Box of Motor 68697 Vehicles Harrisburg, • Vehicle PAInspection 17106-8697 Division OFFICIAL VEHICLE SAFETY INSPECTOR • PRINT OR TYPE ALL INFORMATION - MUST BE SUBMITTED TO AN APPROVED EDUCATIONAL FACILITY Applicant must be 18 years of age and have a valid operator’s license for each class of vehicle he/she intends to inspect. Applicant must also complete a lecture course at an approved educational facility, pass a written test and satisfactorily perform a complete inspection of a vehicle. upon successful completion of these courses, you will receive your certified safety inspection certification card in approximately 6 to 8 weeks from the date your class ended. The school has 35 days from the class ending date to submit the paperwork for processing. You may not begin inspecting until you receive your certification card. A APPLICANT INFORMATION Last Name First Name Middle Name Sex birth Date Driver’s License Number State r M r F Street Address City State County Zip Code Work Telephone Number Home Telephone Number Do you currently hold a valid out-of-state driver’s license? (If yes, attach a copy.) . r Yes r No *Contact PennDOT’s Vehicle Inspection Division at 717-787-2895 to establish an out-of-state mechanic record prior to completion of this class. List any restrictions on your driver’s license (if applicable): ______________________________________________________________ Do you currently hold a valid Pennsylvania driver’s license? . r Yes r No Have you held a Pennsylvania driver’s license in the past? .
    [Show full text]
  • Mandoc: Becoming the Main BSD Manual Toolbox
    mandoc: becoming the main BSD manual toolbox BSDCan 2015, June 13, Ottawa Ingo Schwarze <[email protected]> Cynthia Livingston’sOTTB “Bedifferent” (c) 2013 C. Livingston (with permission) > Ingo Schwarze: mandoc page 2: INTROI BSDCan 2015, June 13, Ottawa Brief history of UNIX documentation • The key point: All documentation in one place and one format. Easy to find, uniform and easy to read and write. Be correct, complete, concise. • 1964: RUNOFF/roffmarkup syntax by Jerome H. Saltzer,MIT. Unobtrusive,diff(1)-friendly,easy to hand-edit, simple tools, high quality output. • 1971: Basic manual structure by Ken Thompson and Dennis Ritchie for the AT&T Version 1 UNIX manuals, Bell Labs. • 1979: man(7) physical markup language for AT&T Version 7 UNIX. • 1989: mdoc(7) semantic markup by Cynthia Livingston for 4.3BSD-Reno. Powerful, self-contained, portable. • 1989: GNU troffbyJames Clarke. • 2001: mdoc(7) rewrite by Werner Lemberg and Ruslan Ermilovfor groff-1.17. • 2008: mandoc(1) started by Kristaps Dzonsons. • 2010: mandoc(1) is the only documentation formatter in the OpenBSD base system. • 2014: mandoc(1) used by default in OpenBSD, FreeBSD, NetBSD, illumos. 16:19:30 What is the mandoc toolbox? → < > Ingo Schwarze: mandoc page 3: INTROIIBSDCan 2015, June 13, Ottawa What is the mandoc toolbox? User perspective:man(1), the manual viewer One comprehensive tool! Normal operation always proceeds in three steps: 1. Find one or more manuals in the file system or using a database by manual name — man(1) — or by search query — apropos(1) =man -k The result of this step can be printed out with man -w.
    [Show full text]
  • LS-CAT: a Large-Scale CUDA Autotuning Dataset
    LS-CAT: A Large-Scale CUDA AutoTuning Dataset Lars Bjertnes, Jacob O. Tørring, Anne C. Elster Department of Computer Science Norwegian University of Science and Technology (NTNU) Trondheim, Norway [email protected], [email protected], [email protected] Abstract—The effectiveness of Machine Learning (ML) meth- However, these methods are still reliant on compiling and ods depend on access to large suitable datasets. In this article, executing the program to do gradual adjustments, which still we present how we build the LS-CAT (Large-Scale CUDA takes a lot of time. A better alternative would be to have an AutoTuning) dataset sourced from GitHub for the purpose of training NLP-based ML models. Our dataset includes 19 683 autotuner that can find good parameters without compiling or CUDA kernels focused on linear algebra. In addition to the executing the program. CUDA codes, our LS-CAT dataset contains 5 028 536 associated A dataset consisting of the results for each legal combina- runtimes, with different combinations of kernels, block sizes and tion of hardware systems, and all other information that can matrix sizes. The runtime are GPU benchmarks on both Nvidia change the performance or the run-time, could be used to find GTX 980 and Nvidia T4 systems. This information creates a foundation upon which NLP-based models can find correlations the absolute optimal combination of parameters for any given between source-code features and optimal choice of thread block configuration. Unfortunately creating such a dataset would, as sizes. mentioned above, take incredibly long time, and the amount There are several results that can be drawn out of our LS-CAT of data required would make the dataset huge.
    [Show full text]
  • R for Beginners
    R for Beginners Emmanuel Paradis Institut des Sciences de l'Evolution´ Universit´e Montpellier II F-34095 Montpellier c´edex 05 France E-mail: [email protected] I thank Julien Claude, Christophe Declercq, Elo´ die Gazave, Friedrich Leisch, Louis Luangkesron, Fran¸cois Pinard, and Mathieu Ros for their comments and suggestions on earlier versions of this document. I am also grateful to all the members of the R Development Core Team for their considerable efforts in developing R and animating the discussion list `rhelp'. Thanks also to the R users whose questions or comments helped me to write \R for Beginners". Special thanks to Jorge Ahumada for the Spanish translation. c 2002, 2005, Emmanuel Paradis (12th September 2005) Permission is granted to make and distribute copies, either in part or in full and in any language, of this document on any support provided the above copyright notice is included in all copies. Permission is granted to translate this document, either in part or in full, in any language provided the above copyright notice is included. Contents 1 Preamble 1 2 A few concepts before starting 3 2.1 How R works . 3 2.2 Creating, listing and deleting the objects in memory . 5 2.3 The on-line help . 7 3 Data with R 9 3.1 Objects . 9 3.2 Reading data in a file . 11 3.3 Saving data . 14 3.4 Generating data . 15 3.4.1 Regular sequences . 15 3.4.2 Random sequences . 17 3.5 Manipulating objects . 18 3.5.1 Creating objects .
    [Show full text]
  • 91 Communication Option Kits
    PowerFlex 7-Class and AFE Options Communication Option Kits Used with PowerFlex Drive Description Cat. No. 70 753/755 AFE BACnet/IP Option Module 20-750-BNETIP ✓ BACnet® MS/TP RS485 Communication Adapter 20-COMM-B ✓✓ Coaxial ControlNet™ Option Module 20-750-CNETC ✓ ControlNet™ Communication Adapter (Coax) 20-COMM-C ✓✓ (1) ✓ DeviceNet™ Option Module 20-750-DNET ✓ DeviceNet™ Communication Adapter 20-COMM-D ✓✓ (1) ✓ Dual-port EtherNet/IP Option Module 20-750-ENETR ✓ EtherNet/IP™ Communication Adapter 20-COMM-E ✓✓ (1) ✓ Dual-port EtherNet/IP™ Communication Adapter 20-COMM-ER ✓✓ HVAC Communication Adapter 20-COMM-H ✓✓ (1) ✓ CANopen® Communication Adapter 20-COMM-K ✓✓ (1) ✓ LonWorks® Communication Adapter 20-COMM-L ✓✓ (1) ✓ Modbus/TCP Communication Adapter 20-COMM-M ✓✓ (1) ✓ Profi bus DPV1 Option Module 20-750-PBUS ✓ Single-port Profi net I/O Option Module 20-750-PNET ✓ Dual-port Profi net I/O Option Module 20-750-PNET2P ✓ PROFIBUS™ DP Communication Adapter 20-COMM-P ✓✓ (1) ✓ ControlNet™ Communication Adapter (Fiber) 20-COMM-Q ✓✓ (1) ✓ Remote I/O Communication Adapter (2) 20-COMM-R ✓✓ (1) ✓ RS485 DF1 Communication Adapter 20-COMM-S ✓✓ (1) ✓ External Communications Kit Power Supply 20-XCOMM-AC-PS1 ✓✓✓ DPI External Communications Kit 20-XCOMM-DC-BASE ✓✓✓ External DPI I/O Option Board(3) 20-XCOMM-IO-OPT1 ✓✓✓ Compact I/O Module (3 Channel) 1769-SM1 ✓✓✓ (1) Requires a Communication Carrier Card (20-750-20COMM or 20-750-20COMM-F1). Refer to PowerFlex 750-Series Legacy Communication Compatibility for details. (2) This item has Silver Series status. (3) For use only with DPI External Communications Kits 20-XCOMM-DC-BASE.
    [Show full text]
  • Linux Command Guide Echo Man Apropos
    Linux Command Guide - Logan - For this guide, I will try to start simple and work my way up to the more complicated topics using layman terms. From echo, to scripting. echo The echo command is very simple, yet very powerful as you'll eventually come to learn. Simply type echo, followed by whatever you want to be echoed, and the command will echo it back at you. Example: Man If you don't know any other command, you should at least know man. Man is short for manual and it's a command used to retrieve some help and documentation (manual pages) on various BASH commands for learning. To use it, simply type man followed by the name of the command about which you are interested in learning. For example: man echo will retrieve the manual page for the grep command for your endless reading pleasure. Apropos The man pages have short descriptions that you can search using the command apropos. If you have a very basic idea of what the command you're looking for does, but aren't sure what it's called, you can type apropos, followed by a word associated with the function of the command to find it. For example: This shows a list of short man page descriptions that contain the keyword “who”. Info / pinfo The info command is a lot like the man command, except it will often retrieve more detailed help than that found in the man pages. It is used in the same way as the man command. Info is also more relevant to GNU based utilities, and sometimes, if you can't find a man page for a command, you can find the info for it.
    [Show full text]
  • Linux File System and Linux Commands
    Hands-on Keyboard: Cyber Experiments for Strategists and Policy Makers Review of the Linux File System and Linux Commands 1. Introduction Becoming adept at using the Linux OS requires gaining familiarity with the Linux file system, file permissions, and a base set of Linux commands. In this activity, you will study how the Linux file system is organized and practice utilizing common Linux commands. Objectives • Describe the purpose of the /bin, /sbin, /etc, /var/log, /home, /proc, /root, /dev, /tmp, and /lib directories. • Describe the purpose of the /etc/shadow and /etc/passwd files. • Utilize a common set of Linux commands including ls, cat, and find. • Understand and manipulate file permissions, including rwx, binary and octal formats. • Change the group and owner of a file. Materials • Windows computer with access to an account with administrative rights The Air Force Cyber College thanks the Advanced Cyber Engineering program at the Air Force Research Laboratory in Rome, NY, for providing the information to assist in educating the general Air Force on the technical aspects of cyberspace. • VirtualBox • Ubuntu OS .iso File Assumptions • The provided instructions were tested on an Ubuntu 15.10 image running on a Windows 8 physical machine. Instructions may vary for other OS. • The student has administrative access to their system and possesses the right to install programs. • The student’s computer has Internet access. 2. Directories / The / directory or root directory is the mother of all Linux directories, containing all of the other directories and files. From a terminal users can type cd/ to move to the root directory.
    [Show full text]
  • Poolcomm Setup Wireless Capability with Water Quality Controllers
    Poolcomm Setup Wireless Capability with Water Quality Controllers Contents Registration. .............................. .2 Cell/Satellite. ......................... .2 WIFI. .................................... .3 IMPORTANT SAFETY INSTRUCTIONS Basic safety precautions should always be followed, including the following: Failure to fol- low instructions can cause severe injury and/or death. This is the safety-alert symbol. When you see this symbol on your equipment or in this manual, look for one of the following signal words and be alert to the potential for personal injury. WARNING warns about hazards that could cause serious personal injury, death or ma- jor property damage and if ignored presents a potential hazard. CAUTION warns about hazards that will or can cause minor or moderate personal injury and/or property damage and if ignored presents a potential hazard. It can also make con- sumers aware of actions that are unpredictable and unsafe. Hayward Commercial Pool Products 10101 Molecular Drive, Suite 200 Rockville, MD 20850 www.haywardcommercialpool.com USE ONLY HAYWARD GENUINE REPLACEMENT PARTS To activate your new CAT 4000 wireless controller on the Poolcomm web site you must first create an account. Register PoolComm Account Go to www.poolcomm.com, and select the “Register Account” link on the top left of the page. Complete all the required company information and press “Register”. You will receive an email containing your 8- letter login in password. This can be changed to a password of your choice after your first login. Register New Unit Once logged in, select the “Register New Unit” tab. Next using the six digit serial number printed on the side of the controller, fill in all the information and then select “Register Unit”.
    [Show full text]
  • RESPONDING to COMPLEXITY a Case Study on the Use of “Developmental Evaluation for Managing Adaptively”
    RESPONDING TO COMPLEXITY A Case Study on the Use of “Developmental Evaluation for Managing Adaptively” A Master’s Capstone in partial fulfillment of the Master of Education in International Education at the University of Massachusetts Amherst Spring 2017 Kayla Boisvert Candidate to Master of Education in International Education University of Massachusetts Amherst Amherst, Massachusetts May 10, 2017 Abstract Over the past 15 years, the international development field has increasingly emphasized the need to improve aid effectiveness. While there have been many gains as a result of this emphasis, many critique the mechanisms that have emerged to enhance aid effectiveness, particularly claiming that they inappropriately force adherence to predefined plans and hold programs accountable for activities and outputs, not outcomes. However, with growing acceptance of the complexity of development challenges, different ways to design, manage, and evaluate projects are beginning to take hold that better reflect this reality. Many development practitioners explain that Developmental Evaluation (DE) and Adaptive Management (AM) offer alternatives to traditional management and monitoring and evaluation approaches that are better suited to address complex challenges. Both DE and AM are approaches for rapidly and systematically collecting data for the purpose of adapting projects in the face of complexity. There are many advocates for the use of DE and AM in complex development contexts, as well as some case studies on how these approaches are being applied. This study aims to build on existing literature that provides examples of how DE and AM are being customized to address complex development challenges by describing and analyzing how one non-governmental organization, Catalytic Communities (CatComm), working in the favelas of Rio de Janeiro, Brazil, uses DE for Managing Adaptively, a term we have used to name their approach to management and evaluation.
    [Show full text]
  • The Linux Command Line
    The Linux Command Line Second Internet Edition William E. Shotts, Jr. A LinuxCommand.org Book Copyright ©2008-2013, William E. Shotts, Jr. This work is licensed under the Creative Commons Attribution-Noncommercial-No De- rivative Works 3.0 United States License. To view a copy of this license, visit the link above or send a letter to Creative Commons, 171 Second Street, Suite 300, San Fran- cisco, California, 94105, USA. Linux® is the registered trademark of Linus Torvalds. All other trademarks belong to their respective owners. This book is part of the LinuxCommand.org project, a site for Linux education and advo- cacy devoted to helping users of legacy operating systems migrate into the future. You may contact the LinuxCommand.org project at http://linuxcommand.org. This book is also available in printed form, published by No Starch Press and may be purchased wherever fine books are sold. No Starch Press also offers this book in elec- tronic formats for most popular e-readers: http://nostarch.com/tlcl.htm Release History Version Date Description 13.07 July 6, 2013 Second Internet Edition. 09.12 December 14, 2009 First Internet Edition. 09.11 November 19, 2009 Fourth draft with almost all reviewer feedback incorporated and edited through chapter 37. 09.10 October 3, 2009 Third draft with revised table formatting, partial application of reviewers feedback and edited through chapter 18. 09.08 August 12, 2009 Second draft incorporating the first editing pass. 09.07 July 18, 2009 Completed first draft. Table of Contents Introduction....................................................................................................xvi
    [Show full text]