3.4 User Interfaces This tutorial will give you a first-hand experience of: Navigating the directory structure in a CLI and an unfamiliar GUI Running the.

Slides:



Advertisements
Similar presentations
Macintosh OS X. What is an operating system? O Like cars, computers have operating systems (sometimes abbreviated OS). O A computer operating system is.
Advertisements

 Use the Left and Right arrow keys or the Page Up and Page Down keys to move between the pages. You can also click on the pages to move forward.  To.
Windows XP Basics OVERVIEW Next.
Exploring the UNIX File System and File Security
The sequence of folders to a file or folder is called a(n) ________.
A Mini UNIX Tutorial. What’s UNIX?  An operating system run on many servers/workstations  Invented by AT&T Bell Labs in late 60’s  Currently there.
Linux Shell. 2 Linux Command-Line Interface ■ Linux shells: A shell is a command interpreter that allows you to type commands from the keyboard to interact.
L INUX C OMMAND L INE I NTERFACE G UNAANBAN.G
Computer Systems Week 10: File Organisation Alma Whitfield.
Notes Assignment #1 is due next Friday by 11:59 pm via Test #1 will be held Thursday February 18 at the start of class (one period long) Format:
1 THE UNIX FILE SYSTEM By Chokechai Chuensukanant ID COSC 513 Operating System.
Chapter 9 Part II Linux Command Line Access to Linux Authenticated login using a Linux account is required to access a Linux system. The Linux prompt will.
CIM6400 CTNW (04/05) 1 CIM6400 CTNW Lesson 6 – More on Windows 2000.
How computers work Learning objective 2: Explain the four basic functions of a computer.
Chapter Three The UNIX Editors. 2 Lesson A The vi Editor.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
Microsoft Windows 7 Part 1 Fundamentals of Using Windows 7.
Computing Fundamenatls CMSC 201 Computer Science I Penny Rheingans University of Maryland Baltimore County (with inspiration from previous 201 instructors.
Chapter Two Exploring the UNIX File System and File Security.
1 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Some content in this lecture added.
Operating Systems and Using Linux CMSC 104, Lecture 3 John Y. Park 1.
Chapter 1 : The Linux System Part 2 Lecture 2 11/14/
Unix Commands PowerPoint Presentation developed for LS 560 Information Technology online class - University of Alabama by Debey Sklenar TENacious Cohort.
Chapter Three The UNIX Editors.
Introduction to Programming Using C An Introduction to Operating Systems.
Computer Skills Chapter 3. Computer Skills1 by Maram & Dareen windows It is a GUI (Graphical User Interface) operating system which is designed for personal.
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop III - Part A Shell Commands Professional Training.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
 Last lesson, the Windows Operating System was discussed along with the Windows command shell  Unix is a computer operating system, that similarly manages.
A Mini UNIX Tutorial. What’s UNIX?  An operating system run on many servers/workstations  Invented by AT&T Bell Labs in late 60’s  There are many different.
Learning basic Unix command It 325 operating system.
CS 120 Extra: The CS1 Server Tarik Booker CS 120.
CMSC 104, Version 9/011 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Reading None.
Introduction to the Command Line for Data Analysts Gus Cavanaugh
Development Environment
Getting started with CentOS Linux
Chapter 1 Getting Started
Navigating the Filing System
UNIX The Basics Source:
Computer Skills windows.
Computing Fundamenatls CMSC 201 Computer Science I Penny Rheingans University of Maryland Baltimore County (with inspiration from previous 201 instructors.
An Introduction to Computers and Visual Basic
Assignment Preliminaries
An Introduction to Computers and Visual Basic
Engineering Innovation Center
Operating Systems and Using Linux
Basic Computing for Teachers
Intro to UNIX System and Homework 1
Operating Systems and Using Linux
Exploring the UNIX File System and File Security
Operating Systems and Using Linux
Operating Systems and Using Linux
Operating Systems and Using Linux
Computer Skills Chapter 3.
Introduction Paul Flynn
Operating Systems and Using Linux
Getting started with CentOS Linux
An Introduction to Computers and Visual Basic
Operating Systems and Using Linux
Operating Systems and Using Linux
Operating Systems and Using Linux
Module 6 Working with Files and Directories
Java Tutotrial for [NLP-AI] 2
This is provided for PERSONAL COMPUTER USE only!
Software - Operating Systems
Linux File System Commands
Starter Which of these inventions is: Used most by people in Britain
Windows Operating System
Computer Skills windows.
Computer Skills windows.
Presentation transcript:

3.4 User Interfaces This tutorial will give you a first-hand experience of: Navigating the directory structure in a CLI and an unfamiliar GUI Running the same program from both a CLI and a GUI Writing and running your own programs via the CLI and a GUI Exiting a CLI and a GUI …all on a Raspberry Pi instead of a PC

3.4 User Interfaces By the end of of the tutorial, you need to present a summary of how to achieve these things in a CLI and a GUI: Finding a file by navigating the directories/folders Creating a folder Running a program Creating a text file Creating and running your own program Finally, you will write an evaluation that compares CLIs to GUIs in general terms based on your personal experience

The Raspberry Pi It is a computer, it just happens to be small It uses a Linux operating system, not Windows The operating system and all programs and data are stored on flash memory, not a hard disk drive

The Raspberry Pi You will notice that its performance is somewhat inferior to the PC that you are used to You will also notice that it does not have obvious buttons like an on/off button If your Raspberry Pi freezes or stops working correctly, do not guess what to do. Seek help to prevent it from getting damaged.

Part 1 Command Line Fundamentals

Turn it on and log in Switch the Pi on at the plug Wait for the password prompt The login details are: USERNAME: pi PASSWORD: raspberry When keying in the password, no characters will appear on the screen. Why do you think this is?

Command line fundamentals You will be brought to this command prompt: pi@raspberrypi ~ $ To operate a command line interface, you key in COMMANDS followed by any PARAMETERS that are needed

Command line fundamentals At the prompt, type pwd This will show you the full path to the current working directory pwd stands for “print working directory”, as we use the word “print” to refer to output to the screen and not the printer in this context Since this is where it took you first, you have just learned where your HOME directory is

Command line fundamentals In Linux, the HOME directory will be your user area In Linux, the ROOT directory is at the top of the tree structure that holds all user areas and computer settings together To get back to your HOME directory, type in cd ~ To get to the ROOT directory, type cd /

Command line fundamentals Go to your HOME directory using what you saw on the previous slide You are inside a folder, and now we want to see what is found inside this folder, so type in ls Read the screen carefully, then type ls –l What is the difference between ls and the very similar ls –l?

Command line fundamentals Using ls -l, you can now see that some of the items in your folder/directory are themselves folders/directories If you want to switch into one of the folders in the list, use cd folderName The name of the folder is an example of a PARAMETER. The COMMAND is cd, which changes directory, and its parameter is the name of the “destination” folder

Command line fundamentals Use cd Pictures to switch into the folder of pictures Using what you know, show the list of all pictures stored in this directory Hopefully by now you are comfortable that a folder is a directory. We’ll call them directories from now on.

Command line fundamentals By now, you should be in the Pictures directory. How do you know that? To return to the directory that holds this directory, use cd .. Think of cd .. as “go one step up the directory tree” To move 2 steps up the tree, use cd ../..

Command line fundamentals Go to your TASK RECORDING SHEET now and ensure that you have answered all questions before moving on

PART 2 MAKING DIRECTORIES AND FILES

Making directories Go to your HOME directory Make a subdirectory called briefNotes as follows: mkdir briefNotes The name of the directory is briefNotes so it is supplied as a PARAMETER when the command mkdir is used

Making directories Step into your briefNotes directory Make 2 subdirectories inside briefNotes that are called “Technical” and “General” Go back to your HOME directory by typing in just 1 command Use a mixture of cd and ls to ensure that you have completed this correctly

Making a file To make a new text file, go to the directory in which you wish to make the new file and type in touch fileName.txt Practise this by navigating to your HOME directory and creating a file called ShoppingList.txt Create 2 more text files of any name of your choice to practise creating empty files

Deleting a file To delete a file, go to the directory where the file lives and type in rm fileName.txt Practise this by deleting the 2 files of any name that you made previously, but keep the text file called ShoppingList.txt Create a directory called trasher and immediately use rm to delete it Use ls to verify the success of your deletions

Deleting a directory To delete a directory, go to the directory above it and type in rm –r direcName The -r is called a FLAG. What other command have you encountered already that uses the –l flag? -r is required because it goes through the directory and removes all of its contents before removing the directory itself

PART 3 Running A Program

How to run a program There is a program built in to Linux called nano It is a plain text editor, just like Notepad You should be conscious of which directory you are in before you run the program To run nano, simply type nano You will see a blank screen and you can start typing into it

How to run a program When you want to save your work for the first time, nano will ask you to give it a name and a file type (you control this) The directory that it will be saved into is the same directory from which you launched nano You use Ctrl+O on the keyboard to save the file in the directory that you are working in

How to run a program Try using nano to create a plain text file called Playlist.txt in your HOME directory in which you store a list of songs that you intend to play at a party, simply listing each one on a new line of the text file After saving it, to exit nano use Ctrl+X To check that your file exists use ls, and to read it use nano Playlist.txt

How to run a program You can run many programs in Linux simply by typing in their names Scratch is a GUI-based program and could not run in a command line environment, so when it is run from the command line, the operating system invokes its GUI capability and supports the running of the program Try typing scratch at the prompt

PART 4 PROGRAMMING

Programming To program means to write code that will cause the computer to do what you tell it to Python is one of many programming languages that humans can learn and computers can understand We have already learned how to use nano to edit text files, so now we will edit a Python program using nano and run it using python

Programming Choose your HOME directory to work in Use touch hello.py to make a new Python file (observe that it is not a text file, but nevertheless it is built from purely plain text) Open the file you have just made in nano using nano hello.py

print(‘Hello world’); Programming Type the following Python code into your newly created Python file: print(‘Hello world’); Use your nano skills to save and exit the file Run the program thus: python hello.py

PART 5 Exiting the command line

Safely exiting the CLI If you want to switch out of the command line and go into the GUI version of Linux, type startx When you are ready to shut down the Raspberry Pi completely, type sudo halt Wait until all processes are finished before disconnecting the power supply