Linux: - PowerPoint PPT Presentation

1 / 49
About This Presentation
Title:

Linux:

Description:

This unit provides basic information about Linux ... Shell Scripts. 9/10/09. 17. standard input/output. 9/10/09. 18. The Filesystem ... – PowerPoint PPT presentation

Number of Views:45
Avg rating:3.0/5.0
Slides: 50
Provided by: alba5
Category:
Tags: linux

less

Transcript and Presenter's Notes

Title: Linux:


1
Linux
  • Getting Started

2
Objectives
  • This unit provides basic information about Linux
  • After completing this unit, you should be able
    to
  • Logon
  • Execute basic tasks
  • Describe the basic structure
  • Edit files
  • Manage the file system

3
Contents
  • 1 - Introduction.
  • 2 - Login, work, logout.
  • 3 - Structure file system, process.
  • 4 - Commands.
  • 5 - Editors.
  • 6 - Compile and run a program.
  • 7 - Finding help.

4
1 - Introduction
5
Where to get more information...
  • www.linux.org
  • www.redhat.com

6
What is Linux?
  • Open Source Operating System.
  • Freely distributed
  • Based on Unix
  • Being developed by programmers all over the
    world.
  • Very popular Unix brand

7
History
  • 1991 - Linux is created as a hobby by a student
    at University of Helsinki (Finland)
  • 1992 - First public version
  • 1993 - First prefabricated Linux distributions
  • 1996 - Support for non-Intel processors
  • 1999 - Linux 2.2 released (the version currently
    in use)

8
2 - Login, work, logout.
9
How to login
10
What one sees after login...
11
The desktop
  • Several desktop environments available to Linux
    (Gnome and KDE among others).
  • Xwindow compatible.
  • Drag and drop capabilities.
  • Easily customized.

12
Open a new window...
13
How to logout
14
3 - Linux Structure
15
Unix Structure
16
Shells
  • Several shells available ksh,csh, bsh...
  • Linux gt bash
  • Shell Scripts

17
standard input/output
18
The Filesystem
  • Notice the similarities with other OS.

19
Permissions
  • All directories are special files
  • The read/write/execute scheme is used

20
4 - Commands
21
Command format
  • ltcommandgt ltoptionsgt ltargumentsgt
  • Examples
  • ls -la /home/group1
  • (this enables the user to see the file structure
    with dates etc)
  • who
  • (it shows who is logged in the same machine)
  • ps -ef
  • (it shows what processes are running specifically
    for this session)

22
Command format
  • Pipes and filters
  • Pipes makes the output of the command to become
    the input for the next command
  • Filters read from input and write to standard
    output
  • command filter

23
Command format
  • examples
  • ps -ef grep group1
  • (this shows all processes related with userid
    group1)
  • ps -ef grep group1 wc -l
  • (this will count the number of processes related
    with group1)

24
Basic Command...
  • List files ls -la
  • Mnemonic list

25
Three important tips
  • 1 - Double ltescapegt
  • Get file or command names with a few characters
  • 2 - Arrows
  • Retrieve commands using ? or ?
  • 3 - ctrl-C
  • stop programs at once

26
File commands
  • ls -la shows all files
  • mv ltname1gt ltname2gt to rename a file, move
  • cp ltname1gt ltname2gt copy a file or directory

27
File commands (cont.)
  • rm ltnamegt remove a file or dir
  • touch ltnamegt creates a zero size file
  • more shows the file
  • (like type in DOS)

28
Examples ls, cp, mv
29
Examples mv, touch
30
Examples more
31
Directory commands
  • cd (change directory)
  • mkdir (make directory)
  • rmdir (remove directory)
  • pwd (which directory?)

32
cd, mkdir, rmdir
33
Process
  • ps -ef (shows all running process)

34
Shells and Process
35
5 - Editing files
36
Open gEdit
37
Graphical Editors
  • There are several editors available. gEdit is an
    example

38
Other editors.
  • gxedit
  • vim, gvim
  • emacs
  • joe
  • jed
  • etc..

39
Print files
  • lpr -Pltqueue namegt ltfile namegt
  • Example print /etc/hosts
  • lpr -Pbrother56 /etc/hosts

40
Print files
  • To query the queue manager
  • lpq -Pltqueue namegt

41
Print files
42
6 - How to compile and run a test program
43
Compile and run
  • g77 ltfile namegt
  • Creates a.out by default
  • To run type a.out
  • g77 ltfile namegt -o ltany-namegt
  • Creates any-name executable
  • To run type that name

44
Compile and test.
45
Compile and test (cont.).
46
7 - Finding help
47
man command
  • man stands for manual
  • available in most Unix brands
  • man ltcommandgt

48
man command
  • To scroll forward and backward
  • press space or page down to forward
  • press b or page up to backward
  • press q to quit

49
man example
  • man ls
Write a Comment
User Comments (0)
About PowerShow.com