There are three types of users in linux  System users: (they are the software/applications users created automatically by the system) e.g mail, MySQL,

Slides:



Advertisements
Similar presentations
LIS651 lecture 5 direct use of wotan Thomas Krichel
Advertisements

RH030 Linux Computing Essentials
Linux can be generally divided into four major components: 1. KERNEL – OS, ultimate boss The kernel is the core program that runs programs and manages.
Learning Unix/Linux Bioinformatics Orientation 2008 Eric Bishop.
Chapter One The Essence of UNIX.
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.
Introduction to Unix (CA263) File System
Exploring the UNIX File System and File Security
The UNIX File System.
UNIX Chapter 00 A “ Quick Start ” into UNIX Operating System Mr. Mohammad Smirat.
Guide To UNIX Using Linux Third Edition
Guide To UNIX Using Linux Third Edition
Very Quick & Basic Unix Steven Newhouse Unix is user-friendly. It's just very selective about who its friends are.
Linux Commands LINUX COMMANDS.
L INUX C OMMAND L INE I NTERFACE G UNAANBAN.G
1. This presentation covers :  User Interface Administration  Files System and Services Management 2.
Guide To UNIX Using Linux Fourth Edition
Overview of Linux CS3530 Spring 2014 Dr. José M. Garrido Department of Computer Science.
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.
The file structure and related utilities CS240 Computer Science II.
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”
Manage Directories and Files in Linux
Introducing UNIX EMBnet slide 1 Introducing the UNIX Operating System.
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.
Guide to Linux Installation and Administration, 2e1 Chapter 8 Basic Administration Tasks.
Unix Basics Chapter 4.
Cmsc 312 Operating Systems. UNIX? DOS – PC? VAX/VMS - mainframe Unix – PC, workstation, mainframe 1970 bell Lab For computer scientist? Why popular? Free.
Computer Programming for Biologists Oct 30 th – Dec 11 th, 2014 Karsten Hokamp  Fill out.
Chapter Two Exploring the UNIX File System and File Security.
INTRODUCTION TO LINUX Jacob Chan. GNU/Linux Consists of Linux kernel, GNU utilities, and open source and commercial applications Works like Unix –Multi-user.
Linux Administration. Pre-Install Different distributions –Redhat, Caldera, mandrake, SuSE, FreeBSD Redhat Server Install –Check HCL –Significant issues.
Agenda Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Review next lab assignments Break Out Problems.
USING YOUR INSTALLED LINUX SYSTEM.  Common Linux Tasks  Installing Custom Packages  Common GUI Applications  Command Line Shell  Directory Structure/Navigation.
CIT 140: Introduction to ITSlide #1 CSC 140: Introduction to IT Operating Systems.
There are three types of users in linux  System users: ?  Super user: ?  Normal users: ?
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:
Manage Directories and Files in Linux. 2 Objectives Understand the Filesystem Hierarchy Standard (FHS) Identify File Types in the Linux System Change.
Chapter Two Exploring the UNIX File System and File Security.
ITR3 lecture 6: intoduction to UNIX Thomas Krichel
Chapter 3 & 6 Root Status and users File Ownership Every file has a owner and group –These give read,write, and execute priv’s to the owner, group, and.
Unix and Samba By: IC Labs (Raj Kidambi). What is Unix?  Unix stands for UNiplexed Information and Computing System. (It was originally spelled "Unics.")
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:
Review Please hand in any homework and practicals Vim Scripting Inter-device communication.
1 © 2001 John Urrutia. All rights reserved. Chapter 4 The LINUX Filesystem.
Introduction to Programming Using C An Introduction to Operating Systems.
UNIX History - joint venture between MIT and Bell Labs (originally called Multics) – Ken Thompson (AT&T) created an operating system to run Space.
1 Begin to use Linux. 2 Background  Linux is an operating system similar to UNIX. It runs on many different computers and was first released in 1991.
Week Two Agenda Announcements Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Next lab assignments.
Lesson 3-Touring Utilities and System Features. Overview Employing fundamental utilities. Linux terminal sessions. Managing input and output. Using special.
Linux Commands C151 Multi-User Operating Systems.
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop V Files and the File System Part B – File System.
CS 245 – Part 1 Using Operating Systems and Networks for Programmers Jiang Guo Dept. of Computer Science California State University Los Angeles.
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.
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.
CS 120 Extra: The CS1 Server Tarik Booker CS 120.
Linux Administration – Finding You Way on the Command Line The Linux File Directory or Tree.
Overview of Linux Fall 2016 Dr. Donghyun Kim
Introducing the UNIX Operating System.
Web Programming Essentials:
Linux 101 Training Module Linux Basics.
UBUNTU INSTALLATION
Linux file system "On a UNIX system, everything is a file;
Basic Commands ls cp ls –l (in detail format) echo ls –a
C151 Multi-User Operating Systems
9 Linux on the Desktop.
Exploring the UNIX File System and File Security
Web Programming Essentials:
Chapter 7 File and file System structure
Chapter 4: The Linux Filesystem
January 26th, 2004 Class Meeting 2
Presentation transcript:

There are three types of users in linux  System users: (they are the software/applications users created automatically by the system) e.g mail, MySQL, ftp …..  Super user: (the superuser/root user/system administrator is only one, his duties are to install software + create or delete users + look after the system resources ….) the prompt sign of super user is # in all shells.  Normal users: (the normal users can me many, the powers of normal users are limited but normal user has full powers in his home directory ) the prompt sign of normal users in $ in bourne shell and % in c-shell

List down files and directories  ls = list down all the files and directories.  ls –a = It will list down all hidden the files and directories  ls –la = It will list down all hidden the files and directories in detail  free =It will show the used, free and total memory of the system. bin dev home lib etc myfilea mYfilea myFilea mnt usr myhomedirbk17oct2013.tar.profile.login bin dev home lib etc myfilea mYfilea myFilea mnt usr myhomedirbk17oct2013.tar -rwxrwxrw- 1 root root 5 aug :34.profile drwxrw-rw- 2 root root 8 aug :34 bin -r—r—r-- 1 usman ali 14 sep :12 Myfilea

 tree -dx / / |--bin |--boot |--dev |--etc |--home | |--bilal | |--abid | | |--myfolder | |--usman |--misc |--lost+found |--mnt |--opt |--root |--sbin |--usr This command will display all the directories ‘first level’, +subdirectories ‘second level’,++subdirectories ‘third level’ and so on.It will also display files

/ “native root” – It is the main directory in which all the rest linux directories are located /bin - It requires about 550mb of space, contain essential commands used by the system when running and booting Linux. /sbin -It requires about 550mb of space, contain essential commands used by the system when running and booting Linux. /boot -It contains Linux kernel which is loaded at boot time.It also contain files that contain information for booting Linux. /dev - It contains 7500 files representing devices. /etc - It contains more then 20mb system configuration files and directories.Containing some major software packages like apache, Openssh and passwd file. /home - It contains the directories of all the normal users, when ever a new user is created then automatically a directory will be created by his/her name inside home directory. when ever a user will login then he/she will automatically will jump in his/her home directory. /proc - It only exist while Linux is running and it shows different memory usage. /usr -It is approx 5GB in size and contains software applications and libraries. /tmp -it is used for temporaty file storage.The tmp directory is cleaned of each day and will delete files that are not used for 10 days. /var - It contains directories and sub directories used by various system services e.g mail, ftp etc…

When you login to the system a session is established and when you logoff the session is ended. Different ways to login  You can connect and establish a session by using keyboard, monitor and a mouse attached to your pc.  You can connect by dial-up modem and establish a session.  You can connect through a wired network and establish a session.  You can connect through a wireless network and establish a session.

 Stand alone pc Requirements: User (optional) Password (optional)  Local Area Network pc Requirements: User Password System name or IP address  Wide area Network Pc Requirements: User Password System name of IP address Port number (optional, default ports ftp 21,telnet 23,ssh 22)

Working with Consoles  Increasing the number of consoles/terminals F1,F2,F3,F4,F5,F6 ….  Jumping back to the precious terminal or another terminal Alt+F4 Alt+F3 Alt+F1 The first console by default name is vt1 and if You increase there number, they will be given a name by the system like vt2, vt3,vt4…

To end a Session COMMANDS logout exit Ctrl+D

Secure Shell The best and the most secure way to log in a remote Linux computer is to use SSH (Secure Shell), it has two parts(server side ssh and client side ssh). Client side windows sshServer side linux ssh

Some important commands of this chapter chfn -To change the user information such as address,phone, .… e.g chfn usman finger –To view the user information e.g finger usman. grep usman /etc/passwd –once the user information is changed, automatically the changes will be made in passwd file which contains the latest information of all the users. The command grep will only find out the information of the user usman. apropos -It will display the command related information. e.g apropos partition. man -It will also display the command related information. e.g man date. (already done ) whereis -It will find out the command and its documents on the entire file system and will display the output along with the path e.g whereis fdisk. links -It will display html pages not in only text mode, but in a slightly better GUI. This command is also helpful if the web browser is not working then you use links command to browse the pages. e.g links /home/umar/myweb/index/html which -It will display the information of a shell, e.g which tsch chsh -To change a shell. e.g chsh –s /bin/tsch or chsh –s /bin/csh. the option –s is used to set the new shell. env -To view the environment “settings” of a user, the home directory path, the shell which the user is using, the by default language etc…. e.g env

Back to user Home directory When ever a new user is created, linux will automatically create a folder by exact user name on the path /home cd - To move and to go into the home directory of a user. If user usman is on the path /home/ali and he want to go to his home directory which will be /home/usman then he will type the command cd cd $HOME -To move and to go into the home directory of a user. If user usman is on the path /home/ali and he want to go to his home directory which will be /home/usman then he will type the command cd $HOME cd ~ -To move and to go into the home directory of a user. If user usman is on the path /home/ali and he want to go to his home directory which will be /home/usman then he will type the command cd ~

Removing/creating files and directories + meta charactor rm -To remove a file. e.g rm file21 rm –R -To remove a directory and all the files and subdirectories inside e.g rm –R mydir33 rm file* -It will remove all the files starting from the name file no matter how lengthy there name is, will remove file1, file111, fileabc43er, fileg * is a meta character which has a special meaning behind it (meaning every thing) rm file? -It will remove all the files starting from the name file and just one more extra character in the name, will remove file1, fileB, filec, file8. ? again is a meta character which has a special meaning behind it (meaning just one character or letter), it acts like a fill in the blank rm f?l? -It will remove all the files starting with the first letter f and the second may be any character/number,third letter must be l and fourth may be any character/number f just one more, will remove file, fBl2, f5l7, f9le, f3lg. ? again is a meta character which has a special meaning behind it (meaning just one character or letter), it acts like a fill in the blank, in this example there are two fill in the blanks touch -It will create an empty file, e.g touch mynewfile mkdir -It will create a directory,e.g mkdir mydir32

Creating and Extracting tar files To combine many files and directories into one folder Creating (-c creating a file, -f file name,-v “verbose”, verbose will display ongoing progress,-z zip a file) Extracting (-x extracting a file) Command Option End Result Target Folder tar -cf mybkdir24sep13.tar mybkdir24sep13 tar -cvf mybkdir24sep13.tar mybkdir24sep13 tar -czf mybkdir24sep13.tar.gz mybkdir24sep13 Command Option Target Folder tar -xf mybkdir24sep13.tar tar -xvf mybkdir24sep13.tar tar -xzf mybkdir24sep13.tar.gz

Name of the editor command to open screen shot  Pico file editor pico myfile CTRL X to exit

Name of the editor command to open screen shot  vi file editor vi myfile :q to quit :w to save :wq to save and exit  I -going to insert mode  Ecs -going to command mode

Name of the editor command to open screen shot  Emacs file editor emacs myfile

chmod 777 myfile Will assign read, write and execute permissions to all owner, group and others (rwxrwxrwx) chmod a+rwx myfile will assing read, write and execute permissions to all owner, group and others (rwxrwxrwx) chmod g-rx myfile will retrieve write permissions from group(rwx-w-rwx chmod -R 644 root will assign read and write permissions to owner and read permissions to group and others, this permission will be effected on the directory as well as all the subdirectories and folders residing inside root (rw--r--) Giving file permissions to files and directories Command -option argument description

Creating a User  useradd bilal Assigning a password to a User  passwd bilal ****** Default new user settings  useradd -D [- options] [-g] [-s] Deleting a user add users home directory as well  userdel –r bilal ‘-r’ /home/bilal