INTRODUCTION TO LINUX Jacob Chan. GNU/Linux Consists of Linux kernel, GNU utilities, and open source and commercial applications Works like Unix –Multi-user.

Slides:



Advertisements
Similar presentations
Pre-Assessment Questions
Advertisements

Learning Unix/Linux Bioinformatics Orientation 2008 Eric Bishop.
CS 497C – Introduction to UNIX Lecture 11: - The File System Chin-Chih Chang
5 Basic utilities When a user logs in to the Linux operating system the directory that they will start in is their home directory. Most users will have.
Exploring the UNIX File System and File Security
Lesson 22 – Introduction to Linux Systems Administration.
Linux+ Guide to Linux Certification, Second Edition
Linux Linux File System.
Guide To UNIX Using Linux Third Edition
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction What is Unix? An operation system (OS), similar to Windows, MacOS X Why learn Unix? Greatest Software.
Linux Commands LINUX COMMANDS.
CS 141 Labs are mandatory. Attendance will be taken in each lab. Make account on moodle. Projects will be submitted via moodle.
COMP1070/2002/lec4/H.Melikian COMP1070 Lecture #5  Files and directories in UNIX  Various types of files  File attributes  Notion of pathname  Commands.
Guide To UNIX Using Linux Fourth Edition
1 THE UNIX FILE SYSTEM By Chokechai Chuensukanant ID COSC 513 Operating System.
The file structure and related utilities CS240 Computer Science II.
Manage Directories and Files in Linux
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.
CHAPTER 1 UNIX FOR NONPROGRAMMERS By U ğ ur Halıcı.
1 Lecture 2 Working with Files and Directories COP 3344 Introduction to UNIX.
Unix Basics Chapter 4.
File Permissions. What are the three categories of users that apply to file permissions? Owner (or user) Group All others (public, world, others)
Linux+ Guide to Linux Certification, Second Edition
Chapter Two Exploring the UNIX File System and File Security.
Linux file system "On a UNIX system, everything is a file; if something is not a file, it is a process." Sorts of files (on a Linux system) Directories:
Introduction to UNIX Road Map: 1. UNIX Structure 2. Components of UNIX 3. Process Structure 4. Shell & Utility Programs 5. Using Files & Directories 6.
Chapter Two Exploring the UNIX File System and File Security.
ITR3 lecture 6: intoduction to UNIX Thomas Krichel
UNIX An Introduction. Brief History UNIX UNIX Created at Bell Labs, 1969 Created at Bell Labs, 1969 BSD during mid 70s BSD during mid 70s AT&T began offering.
Chapter 4 The File Structure. Contents u The Hierarchical File Structure u Directory and Ordinary Files u Directories u Access Permissions u Links.
E X C E E D I N G E X P E C T A T I O N S Basic LINUX Linux System Administration Dr. Hoganson Kennesaw State University Operating Systems Directory structure:
Linux+ Guide to Linux Certification, Third Edition
Linux+ Guide to Linux Certification, Third Edition
1 © 2001 John Urrutia. All rights reserved. Chapter 4 The LINUX Filesystem.
CSC414 “Introduction to UNIX/ Linux” Lecture 5. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
Λειτουργικά Συστήματα – Lab2 Γιάννης Πετράκης. Directory Navigation and Control  The Unix file system is set up like a tree branching out from the root.
CSE 374 Programming Concepts & Tools Hal Perkins Fall 2015 Lecture 2a – A Unix Command Sampler (Courtesy of David Notkin, CSE 303)
Linux Commands C151 Multi-User Operating Systems.
CS 245 – Part 1 Using Operating Systems and Networks for Programmers Jiang Guo Dept. of Computer Science California State University Los Angeles.
1 Lecture 2 Working with Files and Directories COP 3353 Introduction to UNIX.
SUSE Linux Enterprise Desktop Administration Chapter 7 Manage Directories and Files.
UNIX filesystem CS 2204 Class meeting 2 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
Lecture 02 File and File system. Topics Describe the layout of a Linux file system Display and set paths Describe the most important files, including.
1 Introduction to Unix. 2 What is UNIX?  UNIX is an Operating System (OS).  An operating system is a control program that helps the user communicate.
A Brief Overview of Unix Brandon Bohrer. Topics What is Unix? – Quick introduction Documentation – Where to get it, how to use it Text Editors – Know.
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.
Learning Unix/Linux Based on slides from: Eric Bishop.
LINUX Zhengli Zhu, School of Life Sciences. Outline 1. ABC of Linux 2. Basic orers of Linux 3. Bash Programming.
Tutorial of Unix Command & shell scriptS 5027
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.
Linux 101 Training Module Linux Basics.
Linux file system "On a UNIX system, everything is a file;
Some Linux Commands.
C151 Multi-User Operating Systems
Introduction to Unix: Fundamental Commands
Command Line Interface for Beginners
9 Linux on the Desktop.
CSE 374 Programming Concepts & Tools
Tutorial of Unix Command & shell scriptS 5027
Tutorial of Unix Command & shell scriptS 5027
Exploring the UNIX File System and File Security
Introduction to Linux Week 0 - Thursday.
Tutorial of Unix Command & shell scriptS 5027
Tutorial Unix Command & Makefile CIS 5027
Module 6 Working with Files and Directories
Lab 2: Terminal Basics.
Linux Commands LINUX COMMANDS.
Chapter 4: The Linux Filesystem
January 26th, 2004 Class Meeting 2
Presentation transcript:

INTRODUCTION TO LINUX Jacob Chan

GNU/Linux Consists of Linux kernel, GNU utilities, and open source and commercial applications Works like Unix –Multi-user –multi-tasking –Networking –GUI (Fedora, Linux Mint) Stable and robust, but it’s for free (open source) Written by Linus Torvalds

Comparison with Windows Windows is easy to install. BUT it –Is unstable –Performs poorly –Crashes frequently Linux is trickier to install and configure. BUT –Stable –Performs better than Windows –Crashes more rarely than Windows –It is also more flexible than Windows. Linux takes time to master, but it is very powerful

Typing Commands in Linux Format: command -option --argument –Separated by whitespace Commands work on the supplied arguments (much like behaves like a method) Options modify the standard behavior (like the file is readable/writeable/executable)

Creating a User Account How: adduser login_name –Password will be prompted You can log out then log in as the account you created WARNING: Don’t use the system as the super user (root) –If you accidentally delete this, EVERYTHING will be gone (it’s the same as reformatting)

Getting help from online sources How –man command –info command –whereis command –apropos command Try typing ls /usr/man/man1

Files ALL programs, data, hardware devices are considered FILES in the Unix system Each file has a name. They are arranged in directories, which are also files Each file belongs to an owner or a group –The owner, the group, and the rest of the world can either read, write, or execute, provided that they are permitted to do so by the file owner or the super user (root)

File Types Regular Files (-): executables, text files, data files, libraries Directories (d): named references to other files Character device files (c) Block device files (b) Symbolic links (l): file containing a pathname (which may or may not exist) –Hard links: directory entry that exists in same partition

Pathnames Name of a file together with names of directories and subdirectories it is contained Absolute pathname: pathname relative to root (/var/) Relative pathname: pathname relative to the current directory (cs162b/student_profiles)

Root files /bin and /sbin – executables needed at boot time. /boot – contains the Linux kernel and boot data. /dev – contains device files. /etc – contains the system configuration files. /home and /root – home directories of users. /lib and /usr/lib – contains the shared libraries. /proc – contains info about running processes. /tmp and /var/tmp – directory for temporary files. /usr/bin and /usr/sbin – contains executables. /var – contains data files for reading/writing. /opt – contains optional packages.

Create and View (Text) Files -File Creation vi filename ed filename emacs filename -File Viewing cat filename more filename less filename

File Manipulation -Moving files mv old new (rename old to new) mv file folder (move file to folder) -Copying files cp original duplicate (copy original file to duplicate) cp –a folder1 folder2 (copy all contents of folder 1 to folder 2; useful for backing up) -Removing files rm –f file (delete file forcibly) rm –rf directory (recursively delete directory and all contents)

File Statistics wc –lwc file (counts lines, words, characters in file) grep –v pattern file (prints all lines of file that has doesn’t have the pattern) sort –r file (sorts file in increasing/decreasing order) head –n file (prints first n lines of file) tail –n file (prints last n lines of file)

File Statistics cut –cJ-K file (prints all characters in positions J to K of the file cut –dD –fJ-K file (prints all characters in positions J to K with D as the delimiter) cmp file1 file2 (show location of first difference between file1 and file2) diff file1 file2 (show ALL differences between file1 and file2)

Other File Commands ln –s filename linkname (create a symbolic link; NOTE: the file needs not to exist) ln file newfile (create hard links of a file, in which newfile is the alias of the file) touch filename (create empty file or to update file’s date)

Directory Commands pwd (print working directory) cd (home directory will be the working directory) cd dirname (dirname will be the working directory) mkdir dirname (create a new directory dirname) rmdir dirname (remove directory name)

Permissions chmod (change permissions to a file) chmod 777 file (owner, group, world) for each digit: read write executable chown (change owner of file) chown owner.group file chgrp (change group of a file) chgrp grpname file unmask (set file creation mask; what are not allowed in creating directories/files) unmask 022

Next Week Shell Scripting –First lab on shell scripting –More practice on Linux

THE END