Академический Документы
Профессиональный Документы
Культура Документы
11/10/2013
Chapter one
Contents
Computers, parts of computers and their roles Data and Networking Operating systems Accounts Command prompt Command options and arguments DOS and Unix common commands The Job of the Shell
Mekelle Institue of Technology Kifle B.N 2
11/10/2013
11/10/2013
In Government Organizations
In Medical Field In Science Field In Entertainment Field
11/10/2013 Mekelle Institue of Technology Kifle B.N 4
Parts of a Computer
1. Input Devices (Keyboard, Mouse, etc.) 2. Output Devices (Monitor, Speakers, etc.) 3. Central Processing Unit (CPU) and memory 4. Motherboard (Circuit Board) 5. Expansion Cards (Video Card, Sound Card, or NIC)
11/10/2013
Power Supplies
The power supply converts alternatingcurrent (AC) power coming from a wall outlet into direct-current (DC) power, which is a lower voltage. DC power is required for all of the components inside the computer. Cables, connectors, and components are designed to fit together comfortably. Never force any connector
Power Connectors
Most connectors today are keyed connectors.
Keyed connectors are designed to be inserted in only one direction.
Each part of the connector has a colored wire with a different voltage running through it Different connectors are used to connect specific components and various locations on the motherboard: A Molex connector is a keyed connector used to connect to an optical drive or a hard drive. A Berg connector is a keyed connector used to connect to a floppy drive. A Berg connector is smaller than a Molex connector. A 20-pin or 24-pin slotted connector is used to connect to the motherboard. The 24-pin slotted connector has two rows of 12-pins each, and the 20-pin slotted connector has two rows of 10-pins each. A 4-pin to 8-pin auxiliary power connector has two rows of two to four pins and supplies power to all areas of the motherboard. The 4-pin to 8-pin auxiliary power connector is the same shape as the main power connector, but smaller. Older standard power supplies used two connectors called P8 and P9 to connect to the motherboard. P8 and P9 were unkeyed connectors. They could be installed backwards, potentially damaging the motherboard or power supply. The installation required that the connectors were lined up with the black wires together in the middle.
Power Supplies
CAUTION: Do not open a power supply. Electronic capacitors located inside of a power supply can hold a charge for extended periods of time.
Internal Components
Motherboards
The main printed circuit board. Contains the buses, or electrical pathways found in a computer. Buses allow data to travel among the various components. Also known as the system board, the backplane, or the main board. Accommodates CPU, RAM, expansion slots, heat sink/fan assembly, BIOS chip, chip set, sockets, internal and external connectors,
11/10/2013
16
Cooling Systems
Electronic components generate heat. Too much heat can damage components. A case fan makes the cooling process more efficient. A heat sink draws heat away from the core of the CPU. A fan on top of the
ROM Types
Read-only memory chips Programmable read-only memory Erasable programmable read-only memory
Description
Information is written to a ROM chip when it is manufactured. A ROM chip cannot be erased or re-written and can become obsolete. Information is written to a PROM chip after it is manufactured. A PROM chip cannot be erased or re-written.
Information is written to an EPROM chip after it is manufactured. An EPROM chip can be erased with exposure to UV light. Special equipment is required. Information is written to an EEPROM chip after it is manufactured. EEPROM chips are also called Flash ROMs. An EEPROM chip can be erased and re-written without having to remove the chip from the computer.
EPROM
Input Devices
Fingerprint scanner
Input devices used to enter data or instructions into a computer: Mouse and Keyboard Digital camera and digital video camera Biometric authentication device Digital camera Touch screen Scanner
Headphones
11/10/2013
27
Network Interface Card (NIC) is connected to other computers so that information can be exchanged between them. Sound Card converts audio signals (microphone or audio tape) which can be stored as a computer audio file.
11/10/2013 Mekelle Institue of Technology Kifle B.N 28
Hardware
Refers to all the physical components of a computer. Includes all input devices, processing devices, storage devices, and output devices. Examples of hardware are: o keyboard o mouse o motherboard o monitor o hard disk o cables o printer
11/10/2013 Mekelle Institue of Technology Kifle B.N 29
What is OS?
Operating System is a software, which makes a computer to actually work. It is the software the enables all the programs we use. The OS organizes and controls the hardware. OS acts as an interface between the application programs and the machine hardware.
11/10/2013
30
What OS does?
An operating system performs basic tasks such as,
controlling and allocating memory, prioritizing system requests, controlling input and output devices, facilitating networking and managing file systems.
11/10/2013
31
(Contd)
11/10/2013 Mekelle Institue of Technology Kifle B.N 32
The structure of OS consists of 4 layers: 1. Hardware Hardware consists of CPU, Main memory, I/O Devices, etc,
1.
Software (Operating System) Software includes process management routines, memory management routines, I/O control routines, file management routines.
(Contd)
11/10/2013
33
1.
System programs This layer consists of compilers, Assemblers, linker etc. Application programs This is dependent on users need. Ex. Railway reservation system, Bank database management etc.,
1.
11/10/2013
34
Multiprogramming:
Multiprogramming is a technique to execute number of programs simultaneously by a single processor. In Multiprogramming, number of processes reside in main memory at a time. The OS picks and begins to executes one of the jobs in the main memory. If any I/O wait happened in a process, then CPU switches from that job to another job. Hence CPU in not idle at any time.
11/10/2013
35
Multiprogramming (Contd):
OS
Figure
Job 1
Job 2 Job 3 Job 4 Job 5
dipicts the layout of multiprogramming system. The main memory consists of 5 jobs at a time, the CPU executes one by one. Advantages:
11/10/2013
36
Time sharing, or multitasking, is a logical extension of multiprogramming. Multiple jobs are executed by switching the CPU between them. In this, the CPU time is shared by different processes, so it is called as Time sharing Systems. Time slice is defined by the OS, for sharing CPU time between processes. Examples: Multics, Unix, etc.,
11/10/2013
37
3. Input/Output operations
4. Error detection 5. Resource allocation 6. Accounting 7. protection
11/10/2013
38
Programs
o The hardware and the operating system together are referred to as a platform. o Programs, also called applications, use this platform to perform tasks.
Data
o Programs process data that you provide as input to your computer. o Data can be in the form of text, graphics, audio, or video depending on the type of program. o Program processes the data and displays the output on the screen. o You can save this output in a file. o The file can be an audio file, a text file, a graphics file, or a video file.
11/10/2013 Mekelle Institue of Technology Kifle B.N 42
Networks
Is a group of computers and associated devices that are linked together to facilitate sharing information. Can also be used to share data and devices such as printers.
11/10/2013
43
Networks LAN
Connects devices within a limited area (home or a small group of offices)
Commonly includes computers and shared resources (printers and scanners)
11/10/2013
44
Networks WAN
Is a network that connects devices in geographically separated areas.
Is used to connect networks across different countries. The Internet is an example of a WAN.
11/10/2013
45
Internet
Internet is a worldwide collection of public networks that are linked to each other for information exchange. Internet offers a range of services to its users (file transfers between Internet users and electronic mail)
The World Wide Web (WWW), or the Web, is another service that the Internet provides.
An intranet is similar to the Web but is accessible only to authorized users of the organization.
11/10/2013
46
time
Check or correct the system time.
date
Check or correct the system date.
cls
Clear the screen.
scandisk
Scan and check drive c: for errors. ScanDisk replaces chkdsk (see below) on DOS version 6.0 and above (including Windows 95).
chkdsk
Check disk and memory usage of the current disk.
help
List commands (only in DOS versions 5 or later).
11/10/2013
50
dir /w dir /p
md c:\diry cd c:\diry rd c:\diry del file.ext ren file1 file2 copy file1 file2
11/10/2013
51
52
Unix Commands
cal
This command will print a calendar for a specified month and/or year. To show this month's calendar, enter: cal To show a twelve-month calendar for 2008, enter: cal 2008 To show a calendar for just the month of June 1970, enter: cal 6 1970
cat
This command outputs the contents of a text file. You can use it to read brief files or to concatenate files together. To append file1 onto the end of file2, enter: cat file1 >> file2 To view the contents of a file named myfile, enter: cat myfile
11/10/2013
53
Unix Commands
cd
This command changes your current directory location. To switch to a subdirectory (of the current directory) named myfiles, enter: cd myfiles To switch to a directory named /home/dvader/empire_docs, enter: cd /home/dvader/empire_docs To move to the parent directory of the current directory, enter: cd .. To move to the root directory, enter: cd / To return to your home directory, enter: cd
chmod
This command changes the permission information associated with a file. permission to read, write, or execute the file, abbreviated as r, w, and x. These permissions are broken down for three categories of user: first, the owner of the file; second, a group with which both the user and the file may be associated; and third, all other users. These categories are abbreviated as u for owner (or user), g for group, and o for other. To allow yourself to execute a file that you own named myfile, enter: chmod u+x myfile To allow anyone who has access to the directory in which myfile is stored to read or execute myfile, enter: chmod o+rx myfile
11/10/2013
54
Unix Commands
In Unix, how do I change the permissions for a file? You can change file permissions with the chmod command. In Unix, file permissions, which establish who may have different types of access to a file, are specified by both access classes and access types. Access classes are groups of users, and each may be assigned specific access types. The access classes are "user", "group", "other", and "all.
These refer, respectively, to the user who owns the file, a specific group of users, the other remaining users who are not in the group, and all three sets of users.
Access types (read, write, and execute) determine what may be done with the file by each access class.
11/10/2013 Mekelle Institue of Technology Kifle B.N 55
Unix Commands
Access Class u (user) g (group) o (other) a (all: u, g, and o) Operator Access + (add access) - (remove access) = (set exact access) Type r (read) w (write) x(execute)
For example, to add permission for everyone to read a file in the current directory named myfile, at the Unix prompt, you would enter:
chmod a+r myfile
The a stands for "all", the + for "add", and the r for "read".
Note: This assumes that everyone already has access to the directory where myfile is located and its parent directories; that is, you must set the directory permissions separately
11/10/2013 Mekelle Institue of Technology Kifle B.N 56
Unix Commands
You can also specify multiple classes and types with a single command. For example, to remove read and write permission for group and other users (leaving only yourself with read and write permission) on a file named myfile, you would enter: chmod go-rw myfile You can also specify that different permissions be added and removed in the same command. For example, to remove write permission and add execute for all users on myfile, you would enter:
chmod a-w+x myfile
In each of these examples, the access types that aren't specified are unchanged. The previous command, for example, doesn't change any existing settings specifying whether users besides yourself may have read ( r ) access to myfile. You could also use the exact form to explicitly state that group and other users' access is set only to read with the = operator:
chmod go=r myfile
11/10/2013 Mekelle Institue of Technology Kifle B.N 57
Unix Commands
cp
This command copies a file, preserving the original and creating an identical copy. The general syntax for cp is: cp oldfile newfile To copy a file named meeting1 in the directory /home/dvader/notes to your current directory, enter: cp /home/dvader/notes/meeting1 . The . (period) indicates the current directory as destination, and the i ensures that if there is another file named meeting1 in the current directory, you will not overwrite it by accident. To copy a file named oldfile in the current directory to the new name newfile in the mystuff subdirectory of your home directory, enter: cp -i oldfile ~/mystuff/newfile The ~ character (tilde) is interpreted as the path of your home directory. Note: You must have permission to read a file in order to copy it.
date
The date command displays the current day, date, time, and year. To see this information, enter: date
11/10/2013 Mekelle Institue of Technology Kifle B.N 58
Unix Commands
find
The find command lists all of the files within a directory and its subdirectories that match a set of conditions. This command is most commonly used to find all of the files that have a certain name. To find all of the files named myfile.txt in your current directory and all of its subdirectories, enter: find . -name myfile.txt -print To look in your current directory and its subdirectories for all of the files that end in the extension .txt , enter: find . -name "*.txt" -print In these examples, the . (period) represents your current directory. It can be replaced by the full pathname of another directory to search. For instance, to search for files named myfile.txt in the directory /home/user/myusername and its subdirectories, enter: find /home/user/myusername/ -name myfile.txt -print
11/10/2013
59
Unix Commands
jobs
This command reports any programs that you suspended and still have running or waiting in the background (if you had pressed Ctrl-z to suspend an editing session, for example). For a list of suspended jobs, enter: jobs Each job will be listed with a number; to resume a job, enter % (percent sign) followed by the number of the job. To restart job number two, for example, enter: %2 This command is only available in the csh, bash, tcsh, and ksh shells.
kill
Use this command as a last resort to destroy any jobs or programs that you suspended and are unable to restart. Use the jobs command to see a list of suspended jobs. To kill suspended job number three, for example, enter: kill %3 Now check the jobs command again. If the job has not been cancelled, harsher measures may be necessary. Enter: kill -9 %3
11/10/2013
60
Unix Commands
ls
This command will list the files stored in a directory. To see a brief, multi-column list of the files in the current directory, enter: ls
man
This command displays the manual page for a particular command. If you are unsure how to use a command or want to find out all its options, you might want to try using man to view the manual page. For example, to learn more about the ls command, enter: man ls To learn more about man, enter: man man If you are not sure of the exact command name, you can use man with the -k option to help you find the command you need. To see one line summaries of each reference page that contains the keyword you specify, enter: man k keyword
Replace keyword in the above example with the keyword which you want to reference.
11/10/2013 Mekelle Institue of Technology Kifle B.N 61
Unix Commands
mv
This command will move a file. You can use mv not only to change the directory location of a file, but also to rename files. Unlike the cp command, mv will not preserve the original file.
Note: As with the cp command, you should always use i to make sure you do not overwrite an existing file.
To rename a file named oldname in the current directory to the new name newname, enter: mv -i oldname newname To move a file named hw1 from a subdirectory named newhw to another subdirectory named oldhw (both subdirectories of the current directory), enter: mv -i newhw/hw1 oldhw If, in this last operation, you also wanted to give the file a new name, such as firsthw, you would enter:
mv -i newhw/hw1 oldhw/firsthw
11/10/2013 Mekelle Institue of Technology Kifle B.N 62
Unix Commands
mkdir
This command will make a new subdirectory. To create a subdirectory named mystuff in the current directory, enter: mkdir mystuff To create a subdirectory named morestuff in the existing directory named /tmp, enter:
mkdir /tmp/morestuff
pwd
This command reports the current directory path. Enter the command by itself: pwd
rm
This command will remove (destroy) a file. You should enter this command with the -i option, so that you'll be asked to confirm each file deletion. To remove a file named junk, enter: rm -i junk
rmdir
This command will remove a subdirectory. To remove a subdirectory named oldstuff, enter: rmdir oldstuff Note: The directory you specify for removal must be empty. To clean it out, switch to the directory and use the ls and rm commands to inspect and delete files.
11/10/2013
63
Unix Commands
w and who
The w and who commands are similar programs that list all users logged into the computer. If you use w, you also get a list of what they are doing. If you use who, you also get the IP numbers or computer names of the terminals they are using. Ping
The ping command sends an Internet Control Message Protocol (ICMP) ECHO_REQUEST to obtain an ICMP ECHO_RESPONSE from a host or gateway. The ping command is useful for:
Determining the status of the network and various foreign hosts. Tracking and isolating hardware and software problems. Testing, measuring, and managing networks.
If the host is operational and on the network, it responds to the echo. Each echo request contains an Internet Protocol (IP) and ICMP header, followed by a timeval structure, and enough bytes to fill out the packet. The default is to continuously send echo requests until an Interrupt is received (Ctrl-C).
11/10/2013 Mekelle Institue of Technology Kifle B.N 64
The items in square brackets are optional. A string is any finite sequence of characters (i.e., letters, numerals, symbols and punctuation marks).
11/10/2013 Mekelle Institue of Technology Kifle B.N 65