1 basic computer operations
DESCRIPTION
TRANSCRIPT
![Page 1: 1 basic computer operations](https://reader036.vdocument.in/reader036/viewer/2022082511/5462600eaf7959ba618b4c9d/html5/thumbnails/1.jpg)
INTRODUCTION TO LINUX
CS 11 Lab
Introduction to Computer Science
Cheza Marie R. Vianzon
Lecturer
![Page 2: 1 basic computer operations](https://reader036.vdocument.in/reader036/viewer/2022082511/5462600eaf7959ba618b4c9d/html5/thumbnails/2.jpg)
History of Linux
Mid 1980's
Richard Stallman & Free Software Foundation has developed functional alternatives to every major UNIX component except the kernel
1991
Linus Torvalds at the University of Helsinki (Finland) developed the original Linux kernel
March 1992
Linux v1.0 was officially released
![Page 3: 1 basic computer operations](https://reader036.vdocument.in/reader036/viewer/2022082511/5462600eaf7959ba618b4c9d/html5/thumbnails/3.jpg)
History of Linux
1992 onwards
Red Hat Linux – most commonly used distribution
Slackware – offers the full range of expected utilities, tools, and applications
Caldera OpenLinux – comes into two editions: eDesktop 2.4 (workstations) and eServer 2.3 (servers)
S.u.S.E. Linux – popular Linux distribution available in Europe
Debian/GNU – offers more than 3950 software packages using its own package-management system
Corel – newest major Linux distribution; explicitly targeted as a replacement for Microsoft Windows on desktop
![Page 4: 1 basic computer operations](https://reader036.vdocument.in/reader036/viewer/2022082511/5462600eaf7959ba618b4c9d/html5/thumbnails/4.jpg)
File System
Linux has a hierarchical, unified filesystem
Supports 256-character filenames
All command line entries are case sensitive
Uses slash '/' and not backslash '\'
Four types of files
Ordinary files
Directories
Links
Special device files
![Page 5: 1 basic computer operations](https://reader036.vdocument.in/reader036/viewer/2022082511/5462600eaf7959ba618b4c9d/html5/thumbnails/5.jpg)
Prompt
Login as root → machinename:~#
Login as user → machinename:~$
Tilde charcater (~)
Represents home directory
Appended to the end of a filename, which means a backup of a file that has been edited
![Page 6: 1 basic computer operations](https://reader036.vdocument.in/reader036/viewer/2022082511/5462600eaf7959ba618b4c9d/html5/thumbnails/6.jpg)
Shell Account
echo $SHELL
Bourne Shell - /bin/sh
Bourne Again Shell - /bin/bash
Korn shell - /bin/ksh
C-shell - /bin/csh
![Page 7: 1 basic computer operations](https://reader036.vdocument.in/reader036/viewer/2022082511/5462600eaf7959ba618b4c9d/html5/thumbnails/7.jpg)
10 Basic Linux Commandsm
an – Unix manual
ls – lists files
pwd – shows what directory you are in
cd – changes directory
more – shows the contents of text files
whereis – same with 'find' and 'locate'
vi – editing program
grep – extracts info from files
chmod – change file permission
rm – delete file
![Page 8: 1 basic computer operations](https://reader036.vdocument.in/reader036/viewer/2022082511/5462600eaf7959ba618b4c9d/html5/thumbnails/8.jpg)
LAN and Internet Exploration Tools
● telnet – allows you to login remotely from a remote computer to a host server running any linux or linux clone system
● who – shows you who else is currently logged in on you ISP's LAN
● netstat – all sorts of statistics on your LAN, including all Internet connections
● whois – get lots of info on Internet hosts outside your LAN
● nslookup – get a whole bunch more info on other Internet hosts
![Page 9: 1 basic computer operations](https://reader036.vdocument.in/reader036/viewer/2022082511/5462600eaf7959ba618b4c9d/html5/thumbnails/9.jpg)
LAN and Internet Exploration Tools
● dig – even more info on Internet hosts
● finger – get you valuable info about users on other Internet hosts
● ping – to find out if a distant computer is alive and run diagnostic tests
● traceroute – maps Internet connections, reveals routers and boxes running firewalls
● ftp – use it to upload and download files to and from other computers
![Page 10: 1 basic computer operations](https://reader036.vdocument.in/reader036/viewer/2022082511/5462600eaf7959ba618b4c9d/html5/thumbnails/10.jpg)
Listing Directories
● List files in alphabetical order
● Useful options:
– '-a' lists all files, including hidden files– '-A' lists all files, except the current and parent
directory– '-c' sorts file by time (oldest first)– '-d' lists only the name of a directory, not its contents– '-l' lists in long format (permissions and other details)
![Page 11: 1 basic computer operations](https://reader036.vdocument.in/reader036/viewer/2022082511/5462600eaf7959ba618b4c9d/html5/thumbnails/11.jpg)
Listing Directories
● Other useful options:
– '-r' lists in reverse order– '-t' sorts files by time (newest first)– '-x' lists all files across the page instead of in
columns● Current directory (.)
● Parent directory (..)
![Page 12: 1 basic computer operations](https://reader036.vdocument.in/reader036/viewer/2022082511/5462600eaf7959ba618b4c9d/html5/thumbnails/12.jpg)
Permissions
● Read, write, or execute a file or command in a directory
● chmod
– Numeric system● chmod 764 SomeFile
– Symbolic system● chmod g+x SomeFile
![Page 13: 1 basic computer operations](https://reader036.vdocument.in/reader036/viewer/2022082511/5462600eaf7959ba618b4c9d/html5/thumbnails/13.jpg)
Wildcards
● Three types
– Asterisk (*)● Any number of characters anywhere in the
filename– Question mark (?)
● Single character– Brackets ([ ])
● Specific characters
![Page 14: 1 basic computer operations](https://reader036.vdocument.in/reader036/viewer/2022082511/5462600eaf7959ba618b4c9d/html5/thumbnails/14.jpg)
Processes
● Shell acts as the intermediary between the user and the operating system
● Shell can run multiple commands at one time
● Shell can run commands in the background
● Multiple requests to the shell are called processes
● Use 'ps' to list the current processes
● Use 'kill' to stop a process
![Page 15: 1 basic computer operations](https://reader036.vdocument.in/reader036/viewer/2022082511/5462600eaf7959ba618b4c9d/html5/thumbnails/15.jpg)
Using the VI editor
● Two modes– Insert
● Everything you type appears in the document at the place where the blinking cursor is
– Command● Keystrokes perform special functions rather than actually inserting text to the document
![Page 16: 1 basic computer operations](https://reader036.vdocument.in/reader036/viewer/2022082511/5462600eaf7959ba618b4c9d/html5/thumbnails/16.jpg)
Running an Executable File in Linux
● Create a C program i.e. Hello.c
● Compile
– gcc -o Hello Hello.c● Execute/Run
– ./Hello