SlideShare a Scribd company logo
CI1131 ICT Lecture Introduction to Operating Systems (2): the GNU/Linux BASH shell
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, ...
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
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 ~
What's in the root directory?
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)
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
Example: apropos
Example: show processes [1]
Example: show processes [2]
Example: new file with echo
Example: directory listing
Example: permissions
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
Bash: find out more with  man
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

More Related Content

PPT
Operating Systems 1
PDF
Basics of Linux
PPTX
Basics of-linux
PDF
Linux Fundamental
PDF
17 Linux Basics #burningkeyboards
PPTX
Linux basics
PPT
PPTX
Linux day 2.ppt
Operating Systems 1
Basics of Linux
Basics of-linux
Linux Fundamental
17 Linux Basics #burningkeyboards
Linux basics
Linux day 2.ppt

What's hot (20)

PPTX
Terminal Commands (Linux - ubuntu) (part-1)
ODP
Linux cmd
PPTX
Introduction to linux
PPT
Linux Training Workshop
PPTX
Unix shell story
PDF
Linux Getting Started
DOCX
PPT
Unix tutorial-08
PPT
Terminal basic-commands(Unix) -partI
PPT
Linuxppt
PPTX
Suman bhatt
ODP
4. linux file systems
PPTX
UNIX/Linux training
ODP
Getting started with ubuntu
PDF
The basic concept of Linux FIleSystem
PPTX
Unix environment [autosaved]
PDF
Basic Linux commands
PDF
Part 03 File System Implementation in Linux
PPTX
Unix environment
Terminal Commands (Linux - ubuntu) (part-1)
Linux cmd
Introduction to linux
Linux Training Workshop
Unix shell story
Linux Getting Started
Unix tutorial-08
Terminal basic-commands(Unix) -partI
Linuxppt
Suman bhatt
4. linux file systems
UNIX/Linux training
Getting started with ubuntu
The basic concept of Linux FIleSystem
Unix environment [autosaved]
Basic Linux commands
Part 03 File System Implementation in Linux
Unix environment
Ad

Similar to Operating Systems 2 (20)

PDF
linux commands.pdf
PPT
Shell_Scripting.ppt
PDF
bash_1_2021-command line introduction.pdf
PPT
linux-lecture4.ppt
PPTX
TERMINAL COMMANDS IN LINUX TERMINAL USED TO INTERACT WITH SYSTEM
PPT
Linux commands and file structure
PPT
linux-lecture4.pptuyhbjhbiibihbiuhbbihbi
PPT
8.1.intro unix
DOC
Some basic unix commands
PDF
Module 02 Using Linux Command Shell
PPT
HISTORY, TYPES OF EMBEDDED LINUX, COMMANDS,
PPTX
Presentation for RHCE in linux
PPTX
Linux command for beginners
PDF
Linux file commands and shell scripts
PPSX
Unix environment [autosaved]
PPT
Introduction to Unix
PPTX
Basic Linux Commands with syntax and functions
PPTX
Basic Linux Commands and implementation with Examples
PPTX
Introduction to linux day1
PPT
Linux ppt
linux commands.pdf
Shell_Scripting.ppt
bash_1_2021-command line introduction.pdf
linux-lecture4.ppt
TERMINAL COMMANDS IN LINUX TERMINAL USED TO INTERACT WITH SYSTEM
Linux commands and file structure
linux-lecture4.pptuyhbjhbiibihbiuhbbihbi
8.1.intro unix
Some basic unix commands
Module 02 Using Linux Command Shell
HISTORY, TYPES OF EMBEDDED LINUX, COMMANDS,
Presentation for RHCE in linux
Linux command for beginners
Linux file commands and shell scripts
Unix environment [autosaved]
Introduction to Unix
Basic Linux Commands with syntax and functions
Basic Linux Commands and implementation with Examples
Introduction to linux day1
Linux ppt
Ad

Recently uploaded (20)

PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Classroom Observation Tools for Teachers
PPTX
Institutional Correction lecture only . . .
PDF
Basic Mud Logging Guide for educational purpose
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
Lesson notes of climatology university.
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Sports Quiz easy sports quiz sports quiz
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Cell Types and Its function , kingdom of life
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
Pharma ospi slides which help in ospi learning
PPTX
GDM (1) (1).pptx small presentation for students
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Microbial disease of the cardiovascular and lymphatic systems
Classroom Observation Tools for Teachers
Institutional Correction lecture only . . .
Basic Mud Logging Guide for educational purpose
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Lesson notes of climatology university.
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
O7-L3 Supply Chain Operations - ICLT Program
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Sports Quiz easy sports quiz sports quiz
STATICS OF THE RIGID BODIES Hibbelers.pdf
Cell Types and Its function , kingdom of life
Microbial diseases, their pathogenesis and prophylaxis
Supply Chain Operations Speaking Notes -ICLT Program
Pharma ospi slides which help in ospi learning
GDM (1) (1).pptx small presentation for students

Operating Systems 2

  • 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
  • 11. Example: new file with echo
  • 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