Your SlideShare is downloading. ×
Operating Systems 2
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Operating Systems 2

1,242
views

Published on

Tutorial slides for Kingston University ITtoolbox students

Tutorial slides for Kingston University ITtoolbox students

Published in: Education, Technology

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,242
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. CI1131 ICT Lecture Introduction to Operating Systems (2): the GNU/Linux BASH shell
  • 2. Working in BASH
    • Command line – faster than GUI
        • autocompletion; shortcuts with 'alias'
    • Some basic navigational commands:
        • pwd, ls [-lag], cd, pushd, popd, dirs, history, whoami, ...
    • Some basic file management commands:
        • cp, mv, rm, mkdir, rmdir, chown, chmod, ...
    • Creating and reading files with basic shell commands
        • echo, cat, more, ...
    • Editing files with VIM, Emacs, Kate, ...
  • 3. BASH basics
    • Some basic BASH navigational commands.
      • navigate to /usr/share/wallpapers
    • cd /usr/share/wallpapers
      • and display your current directory
    • pwd
      • list all files in this directory
    • ls -a
      • display a ‘long’ listing of all files in this directory
    • ls -la
  • 4. BASH basics
    • Learning some basic BASH commands (2)
      • list all files in this directory that begin with letters ‘a’, ‘b’, ‘c’, or ‘d’
    • ls [a-d]*
      • list all files in this directory that begin with letters ‘a’, ‘e’, ‘s’, or ‘t’
    • ls [aest]*
      • give a ‘long’ listing of all files in your home directory (without navigating there!)
    • ls -la ~
  • 5. What's in the root directory?
  • 6. BASH basics
    • Learning some basic BASH commands (3)
      • create a new directory called ‘Test1’ on your desktop
    • mkdir Test1
      • use echo to create a simple text file in ‘Test1’
    • echo a string of words > Test1/myFile.txt
      • use cat >> to add further lines to your text file (use ctrl-D to finish)
    • cd Test1
    • cat >> myFile.txt
    • more lines of text
    • ....
    • (ctrl-D)
  • 7. BASH basics
    • Learning some basic BASH commands (4)
      • display the contents of your file
    • cat myFile.txt
      • create a second new directory on your desktop called ‘Test2’ and move your text file from Test1 to Test2
    • cd ..
    • mkdir Test2
    • mv Test1/myFile.txt Test2/
      • delete the directory Test1
    • rmdir Test1
  • 8. Example: apropos
  • 9. Example: show processes [1]
  • 10. Example: show processes [2]
  • 11. Example: new file with echo
  • 12. Example: directory listing
  • 13. Example: permissions
  • 14. BASH basics
    • What BASH built-ins are enabled?
    • enable -a
    • What are your environment variables?
    • set
    • What aliases are already pre-defined for you?
    • alias
    • 13 th March 1643 fell on which week day?
    • cal 3 1643
  • 15. Bash: find out more with man
  • 16. Some BASH references
    • The Linux Terminal - a Beginners’ Bash
    • http://linux.org.mt/article/terminal
    • Bash Guide for Beginners
    • http://www.tldp.org/LDP/Bash-Beginners-Guide/html/
    • Linux Shell Scripting Tutorial
    • http://www.freeos.com/guides/lsst/
    • Bash Reference Manual
    • http://www.gnu.org/software/bash/manual/bashref.html