Department of Computer Engineering

Slides:



Advertisements
Similar presentations
By: Tony Andrews.  Linux directory ordering system  Navigating and creating directories ◦ Listing directories and files ◦ Creating directories ◦ Changing.
Advertisements

Learning Unix/Linux Bioinformatics Orientation 2008 Eric Bishop.
Jump to first page Unix Commands Monica Stoica Jump to first page Introduction to Unix n Unix was born in 1969 at Bell Laboratories, a research subdivision.
Chapter One The Essence of UNIX.
Introducing the Command Line CMSC 121 Introduction to UNIX Much of the material in these slides was taken from Dan Hood’s CMSC 121 Lecture Notes.
CIS392 Sp 03Assign#11 CIS392 Text Processing, Retrieval, and Mining Spring 03 Instructor: Dr. Y. F. Brook Wu BOW toolkit:
CS1020: Intro Workshop. Topics CS1020Intro Workshop Login to UNIX operating system 2. …………………………………… 3. …………………………………… 4. …………………………………… 5. ……………………………………
L INUX C OMMAND L INE I NTERFACE G UNAANBAN.G
Linux Installation and Administration Lesson 2 Tutor: George Papamarkos.
Using Macs and Unix Nancy Griffeth January 6, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis of Complex.
1 Day 3 Directories Files Moving & Copying. 2 Case Sensitive First thing to learn about UNIX is that everything is case sensitive. Thus the files: –enda.
Help session: Unix basics Keith 9/9/2011. Login in Unix lab  User name: ug0xx Password: ece321 (initial)  The password will not be displayed on the.
Unix Primer. Unix Shell The shell is a command programming language that provides an interface to the UNIX operating system. The shell is a “regular”
© Crown copyright Met Office An Introduction to Linux PRECIS Workshop, University of Reading, 23rd – 27th April 2012.
Chapter 9 Part II Linux Command Line Access to Linux Authenticated login using a Linux account is required to access a Linux system. The Linux prompt will.
Nick Geoghegan1 Introduction to Linux Workshop. Nick Geoghegan2 Getting Started Download the following files:
Essential Unix at ACEnet Joey Bernard, Computational Research Consultant.
Unix Basics Chapter 4.
CPSC 217 T03 Week I Part #1: Unix and HELLO WORLD Hubert (Sathaporn) Hu.
Chapter 0 A “Quick-Start” into the UNIX Operating System.
1 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Reading None.
BIF713 Basic Unix/Linux Commands Getting Help with Commands.
Chapter 1 : The Linux System Part 2 Lecture 2 11/14/
Unix Commands PowerPoint Presentation developed for LS 560 Information Technology online class - University of Alabama by Debey Sklenar TENacious Cohort.
Introduction To UNIX. FAQReferencesSummaryInfo Resources Introduction Learning Objectives Log on User Interface Commands List of Commands Useful Info.
Agenda Basic Unix Commands (Chapters 2 & 3) Miscellaneous Commands: whereis, which, whoami, finger, passwd, cal, date Working with Files: cat, more, less.
1May 16, 2005 Week 2 Lab Agenda Command Line FTP Commands Review More UNIX commands to learn File name expansion - * Introduction of vi.
1 CSE306 Operating Systems Projects CVS/SSH tutorial.
Introduction to Programming Using C An Introduction to Operating Systems.
1 Lecture 2 Working with Files and Directories COP 3353 Introduction to UNIX.
The Kernel At a high level, the kernel in an operating system serves as the bridge between applications and the actual data processing of the hardware.
 Last lesson, the Windows Operating System was discussed along with the Windows command shell  Unix is a computer operating system, that similarly manages.
1 CS3695 – Network Vulnerability Assessment & Risk Mitigation – Introduction to Unix & Linux.
Unix Fundamentals CS 127. File navigation cd - change directory cd /var/log cd /etc/apache2 cd ~/Desktop ~ is a shortcut for the home directory.
File Management commands cat Cat command cat cal.txt cat command displays the contents of a file here cal.txt on screen (or standard out).
Linux Tutorial Lesson Two *Getting Help in Linux *Data movement and manipulation *Relative and Absolute path *Processes Note: see chapter 1,2,3 from Linux.
CMSC 104, Version 8/061L03OperatingSystems.ppt Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux.
Login Being logged into a command line prompt allows a user to easily and simply execute multiple commands (one-by-one or at the same time) that would.
Assignprelim.1 Assignment Preliminaries © 2012 B. Wilkinson/Clayton Ferner. Modification date: Jan 16a, 2014.
CMSC 104, Version 9/011 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Reading None.
UNIX Basics Matt Hayward October 18, 2016 LS560 – Information Technology for information professionals.
UNIX To do work for the class, you will be using the Unix operating system. Once connected to the system, you will be presented with a login screen. Once.
A “Quick-Start” into the UNIX Operating System
CS1010: Intro Workshop.
Commands Basic syntax of shell commands UNIX or shell commands have a basic structure command -options target command comes first (such as cd or ls) any.
Web Programming Essentials:
UNIX The Basics Source:
Andy Wang Object Oriented Programming in C++ COP 3330
Lecture 2 Working with Files and Directories
Some Linux Commands.
The Command Prompt Commands are the way to “do things” in Unix
Useful Linux Commands.
Assignment Preliminaries
UNIX Basics Internet Technology.
Operating Systems and Using Linux
Operating Systems and Using Linux
Operating Systems and Using Linux
Operating Systems and Using Linux
Operating Systems and Using Linux
Web Programming Essentials:
Introduction Paul Flynn
Operating Systems and Using Linux
UNIX/LINUX Commands Using BASH Copyright © 2017 – Curt Hill.
Operating Systems and Using Linux
Operating Systems and Using Linux
Command line.
Operating Systems and Using Linux
Lab 2: Terminal Basics.
Presentation transcript:

Department of Computer Engineering Week 1 Introduction to UNIX OS Department of Computer Engineering 2001-2002 Fall Prepared by Aykut Guven

Contents 2- INFORMATION ABOUT “CE.DOGUS.EDU.TR” 3- GETTING STARTED. 1- INTRODUCTION TO UNIX OPERATING SYSTEM. 2- INFORMATION ABOUT “CE.DOGUS.EDU.TR” 3- GETTING STARTED. 4- BASIC COMMANDS 5- SELF STUDY. 6- GETTING EXPERIENCE. 7- MORE SOPHISTICATED COMMANDS 8- SELF STUDY 9- ASSIGNMENTS

INTRODUCTION TO UNIX OPERATING SYSTEM Last week it is told what Unix is. Briefly, Unix is Multiuser and Multitask Operating System. It is used to be implemented of large systems as secure and reliable.

UNIX Server of Computer Engineering. ce.dogus.edu.tr During Labarotary sections, as a Unix Server “ce.dogus.edu.tr “ will be used. It has a Linux Red Hat 7.1 Operating System inside of it. You will attach to the System using Telnet programme.

UNIX Server of Computer Engineering. www1.ce.dogus.edu.tr To Connect a Remote System using Telnet you need to have an account in that System Use your name as username and “testtest” as password. These account has been activated for you. If you have any problem with log in use this account username=“test” pass is “testtest” * Please try now and make sure you are able to log in

GETTING STARTED Last week we learnt how to login into Unix System in www1.ce.dogus.edu.tr. Everybody should have a Unix account. If you have not got one,Use “test” as username and “testtest” as password. Aim of this section is to show you basic UNIX commands and to teach you how to use them. For an introduction Please do these steps First. These steps will give you capability of using UNIX Shell.

GETTING STARTED First try to Login into the System; Each user has a unique "home" directory. Your home directory is that part of the file system reserved for your files. After login, you are "put" into your home directory automatically. This is where you start your work. You are in control of your home directory and the files which reside there. You are also in control of the file access permissions (discussed later) to the files in your home directory. Generally, you alone should be able to create/delete/modify files in your home directory. Others may have permission to read or execute your files as you determine. In most UNIX systems, you can "move around" or navigate to other parts of the file system outside of your home directory. This depends upon how the file permissions have been set by others and/or the System Administrator, however. If you have no problem with your account, You have to be inside of your home directory in ce.dogus.edu.tr.

Do these steps You have connected to www1.ce.dogus.edu.tr with your username and password. Type in the following "touch file1 file2 file3" and press return. Type in "ls" to see the files in your home directory. Now, type in "ls -l" to get a longer listing with more information. Now, type in "ls -al" to get an even longer listing. This time you should see files that begin with a period "." Now, type in "man ls" and read about the "ls" command. To continue reading, press the SPACEBAR. Type the letter "q" to quit out of the man program. Type in "cd .." Now, type in "ls -al" again. Now type in "cd" (no periods this time) Type "exit" at the command line to logout.

What happened??? Now, Try to understand what happened when you execute these commands. What they did? For a short time later, we will go on to our Lab section.

Explanation about Happenings Happening here is just executing unix commands. To start, I would like to emphasize one fact: UNIX is CASE SENSITIVE. And, most UNIX people like lower case letters for everything, so get used to it. Now Let’s have a look to the basic unix commands

Basic Commands ls The "ls" command will be one of your most frequently used commands. It is used to list files. You will also usually add the "switch" or options "-la" after the command to get more information about the files. In UNIX, if you name a file starting with a period (e.g. .blah) it will not appear in a regular "ls" command. It is the equivalent to a Windows "hidden" file. Now, if you are very used to Windows, you are probably wondering how you can name files after the period with something like "blah". Well, in UNIX, there is no concept of "file extensions", at least not in the Windows sort of way. For example, if you have a zip archive on your UNIX machine, you can rename it from "whatever.zip" to "whatever.bob" and you could still use the UNIX unzip utility to unzip it.

Basic Commands cd If you are familiar with DOS, then you already know the "cd" command. It stands for change directory. On the command line, you enter "cd" and the directory you want to go to. If the directory you want to go into is within your present directory, then you just need to put the name of the directory there. If you want to switch to a directory that is not located within your present directory, you will want to enter the full path. For example, if you are in your home directory, "/home/yourName" and want to go to the configuration file of the Apache webserver, you would type in "cd /etc/httpd/conf"; you can not simply type in "cd conf".

Basic Commands Man Finally, let's discuss the "man" command. "man" stands for manual. Most commands and programs in UNIX and Linux have a manual page dedicated to them. For example, if you typed in "man ls" you should be shown the manual page describing the "ls" command. If you want to exit from manual just write “Q” and press enter key.

GETTING EXPERIENCE Let’s go more; there is most common UNIX Commands. You are going to learn by doing. Make sure you answer the questions as you go along. Do the steps which are given below on your own.

GETTING EXPERIENCE Login to your practice account. If you are out of the System. Do an "ls" to see the files you have in your directory. Type in "pwd" . What do you see? Type in "uname -a" . What do you see? Now, type in "clear" . What happens? Please type in "man pwd" . What do you see? Use the spacebar to scroll through, and press "q" to quit. Now type in "mkdir" . What happens? Now type "mkdir labpractice" Type "ls". Now what do you see?

GETTING EXPERIENCE Type "cd labpractice". Type "pwd". Where are you now? Type "touch lab3file". Type "ls". What do you see now? Type ls with an -al switch. What do you see? Can you tell how big the file is? Type "cp lab3file lab3file2" . Again, type "ls". What do you see now? Type "rm lab3file2". Again, type "ls". What is there?

GETTING EXPERIENCE Repeat the "rm" command on the other file. Do an "ls -al" to see what's in the directory. Hint: It should be empty. Type in "cd .." Take note. That is cd plus a space, plus two periods. This should bring you back up one directory and put you in your home directory. Type "ls" and then type "rm labpractice" . What happens? Type "rm -r labpractice" and then do an "ls". What happens this time? Type "mkdir public_html". Type "mkdir Desktop". Type "cd Desktop", and then type "touch file1 file2 file3 file4 file5". You are done.

GETTING EXPERIENCE Ls -Lists files. The equivalent of "dir" in DOS. Common switches are -al which will list all files with a long description, including their permissions, size, and datestamp. You can also type in ls -al followed by a specific filename to learn information about that specific file. This is helpful if you have many files within a directory and you only want information on one of them. You can even use wildcards. For example, ls *.html show only files with extension .html uname –aShow info about current machine and operative system pwdPrint Working Directory. Wonder which directory you're currently in? This reveals full path. clearclear the screen touchtouch filename. If filename doesn't exist it gets created (0 byte). If filename already exists, touch alters its timestamp to the current time. Please note, in UNIX we can not easily name files with spaces in them, so words should use underscores or a capital letter to separate them. For example, touch my file will not work. You must write either touch myFile or touch my_file . This applies to creating directories as well.

GETTING EXPERIENCE Mkdir-makes a directory. You can put files in a directory Rmdir-removes an empty directory. If it is not empty, you can use rm -rf instead. Rm-removes files. You can use it with wildcards too. For example rm -f *.html will remove all html files in the directory. You can use it to remove a directory with an -rf switch. However, this is not the ideal way to remove directories. Cp-cp originalFile newFile Creates a copy of the first file having the name of the second. If the paths are not specificied, then cp assumes you mean the current working directory. You can also copy a file to another location. For example, cp OriginalFile /home/someDirectory/newFile will copy a file from the current directory to another directory with "NewFile" as it's name. If no name is specified, and you are copying the file to another directory, then the original filename will be used.

Assignment Lab Assignment 1: Log on to your UNIX account. Make a directory named using your first and last name. Inside that directory, create 2 files, one for your first name and one using your second name. Issue a command to see these files' time stamps. After that, update the timestamps.

Assignment Lab Assignment 2: First,Remove all directories and files which you did in the first assignment. Go to “root” and create a file which name is info. Type some information inside of the file. Then copy the file to the your home directory “home/info/” with same name. Then observe happenings.