Linux Commands Help HANDS ON TRAINING Author: Muhammad Laique

Slides:



Advertisements
Similar presentations
Learning Unix/Linux Bioinformatics Orientation 2008 Eric Bishop.
Advertisements

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.
Unix. Outline Commands Environment Variables Basic Commands CommandMeaning lslist files and directories ls -alist all files and directories mkdirmake.
NETW-240 Shells Last Update Copyright Kenneth M. Chipps Ph.D. 1.
ATS Programming Short Course I INTRODUCTORY CONCEPTS Tuesday, Jan. 27 th, 2009 Essential Unix Commands.
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.
Lesson 22 – Introduction to Linux Systems Administration.
Lecture 01CS311 – Operating Systems 1 1 CS311 – Lecture 01 Outline Course introduction Setting up your system Logging onto the servers at OSU with ssh.
Very Quick & Basic Unix Steven Newhouse Unix is user-friendly. It's just very selective about who its friends are.
L INUX C OMMAND L INE I NTERFACE G UNAANBAN.G
CS 141 Labs are mandatory. Attendance will be taken in each lab. Make account on moodle. Projects will be submitted via moodle.
Introduction to Linux Workshop February Introduction Rob Lane & The HPC Support Team Research Computing Services CUIT.
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.
Linux environment ● Graphical interface – X-window + window manager ● Text interface – terminal + shell.
1 Lecture 2 Working with Files and Directories COP 3344 Introduction to UNIX.
Agenda User Profile File (.profile) –Keyword Shell Variables Linux (Unix) filters –Purpose –Commands: grep, sort, awk cut, tr, wc, spell.
PROGRAMMING PROJECT POLICIES AND UNIX INTRO Sal LaMarca CSCI 1302, Fall 2009.
Additional UNIX Commands. 222 Lecture Overview  Multiple commands and job control  More useful UNIX utilities.
Session 2 Wharton Summer Tech Camp Basic Unix. Agenda Cover basic UNIX commands and useful functions.
Unix/Linux cs3353. The Shell The shell is a program that acts as the interface between the user and the kernel. –The shell is fully programmable and will.
Lesson 2-Touring Essential Programs. Overview Development of UNIX and Linux. Commands to execute utilities. Communicating instructions to the shell. Navigating.
Second edition Your UNIX: The Ultimate Guide Das © 2006 The McGraw-Hill Companies, Inc. All rights reserved. UNIX Commands cal – will print a calendar.
BIF713 Basic Unix/Linux Commands Getting Help with Commands.
Welcome to CS323 Operating System lab 1 TA: Nouf Al-Harbi NoufNaief.net.
Agenda Basic Unix Commands (Chapters 2 & 3) Miscellaneous Commands: whereis, which, whoami, finger, passwd, cal, date Working with Files: cat, more, less.
Introduction to Programming Using C An Introduction to Operating Systems.
Manage Directories and Files in Linux Part 2. 2 Identify File Types in the Linux System The file types in Linux referred to as normal files and directories.
Agenda Basic Unix Commands (Chapters 2 & 3) Miscellaneous Commands: which, passwd, date, ps / kill Working with Files: file, touch, cat, more, less, grep,
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.
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.
1 CS3695 – Network Vulnerability Assessment & Risk Mitigation – Introduction to Unix & Linux.
Basic Unix Commands. Listing files and directories ● ls:command is used to list the files and ● directories in present working directory ● ls command.
Lecture 1: Introduction, Basic UNIX Advanced Programming Techniques.
All of Unix is case sensitive. WARNING!. Shell Prompt Now that you have logged in, you will see a shell prompt. This is where you will spend most of your.
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.
INTRODUCTION TO SHELL SCRIPTING By Byamukama Frank
1 Linux Commands. 2 Path You specify a file or directory by its path name:  the full, or absolute, path name or the one relative to a location. The full.
IT244 - Introduction to Linux / Unix Instructor: Bo Sheng
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.
Getting started with CentOS Linux
Chapter 11 Command-Line Master Class
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.
Andy Wang Object Oriented Programming in C++ COP 3330
The UNIX Shell Learning Objectives:
Lecture 2 Working with Files and Directories
Some Linux Commands.
C151 Multi-User Operating Systems
Agenda Basic Unix Commands (Chapters 2 & 3) Miscellaneous Commands:
Command Line Interface for Beginners
CSE 374 Programming Concepts & Tools
Tutorial of Unix Command & shell scriptS 5027
Basic UNIX OLC Training.
Introduction to UNIX.
Tutorial of Unix Command & shell scriptS 5027
Introduction to Linux Week 0 - Thursday.
Unix : Introduction and Commands
Tutorial of Unix Command & shell scriptS 5027
UNIX Reference Sheets CSE 2031 Fall 2010.
Getting started with CentOS Linux
Tutorial Unix Command & Makefile CIS 5027
Linux Shell Script Programming
Module 6 Working with Files and Directories
Be comfortable with Linux
LPI Linux Certification
Presentation transcript:

Linux Commands Help HANDS ON TRAINING Author: Muhammad Laique

Linux Commands AWS Linux Commands A command is an instruction given by a user telling a computer to do something, such a run a single program or a group of linked programs. Commands are generally issued by typing them in at the command line (the all-text display mode) and then pressing the ENTER key, which passes them to the shell. The first word is the command itself, which tells the shell “what” to do. The remaining words are commands options. An option controls “how” the command is to be performed. AWS Linux Commands

Linux Commands AWS Linux Commands Shell is a UNIX term for the interactive user interface with an operating system. The shell is the layer of programming that understands and executes the commands a user enters. In some systems, the shell is called a command interpreter. The term shell derives its name from the fact that it is an outer layer of an operating system. A shell is an interface between the user and the internal parts of the operating system (at the very core of which is the kernel). AWS Linux Commands

Linux Commands Shell AWS Linux Commands

Linux Commands AWS Linux Commands

Linux Commands AWS Linux Commands

Linux Commands AWS Linux Commands User Name General User’s Symbol Host Name Home Directory of the User AWS Linux Commands

Linux Commands AWS Linux Commands Super User’s Symbol Super user is also known as Root user AWS Linux Commands

Linux Commands AWS Linux Commands ls Lists the information about files and directories. Syntax ls directory-name Options ls –l (long/detailed form) ls –lh (long and human readable form) ls –a (lists all files, also hidden files) ls –t (sort by time) AWS Linux Commands

Linux Commands Symbol Meaning - File b Block Device c Special File d File symbols which lists using ls command output. Symbol Meaning - File b Block Device c Special File d Directory l Link s Socket File AWS Linux Commands

Linux Commands AWS Linux Commands cd Command use to change working directory. Syntax cd /path/directory-name Options cd - (Jump to old working directory) cd OR cd ~ (Jump to home directory of login user) cd .. (Jump to parent directory of current woking directory) cd ../.. (Same as cd.. But jump two step back) AWS Linux Commands

Linux Commands AWS Linux Commands pwd Print the name of current working directory. Syntax AWS Linux Commands

Linux Commands AWS Linux Commands mkdir To create a new directory. Syntax mkdir directory-name Options mkdir -p (to make parent directory as we have needed) AWS Linux Commands

Linux Commands AWS Linux Commands rmdir To remove empty directory. Syntax rmdir dir-name AWS Linux Commands

Linux Commands AWS Linux Commands touch To create an empty file. To update the access and modification time of existing file or directory. Syntax touch file-name touch dir-name AWS Linux Commands

Linux Commands AWS Linux Commands stat To view the status of a file or directory. Syntax stat file-name AWS Linux Commands

Linux Commands AWS Linux Commands file This command is used to determine a file’s file type. Synatx file file-name AWS Linux Commands

Linux Commands AWS Linux Commands rm To remove file or directory. Synatx rm file-name rm -r dir-name Options rm -f (to remove a file forcefully) rm -r (to remove a directory/recursively) rm -rf (to remove a directory forcefully) AWS Linux Commands

Linux Commands AWS Linux Commands mv To move file or directory from one location to an other location. Also used to rename file and directory. Syntax mv file-name /location mv old-name new-name AWS Linux Commands

Linux Commands AWS Linux Commands cat To view contents of file. Also used to create new text file. Syntax cat file-name (to view the file contents) cat > file-name (to create a text file) cat >> file-name (to append the text existing file) Ctrl+d (to save contents of the file) Options cat -n (to view contents of file with line numbers) AWS Linux Commands

Linux Commands AWS Linux Commands cp Use to copy the files and directories. Syntax cp file1 file2 cp -f file1 file2 (to copy file forcefully) cp -r dir1 dir2 (to copy directory recursively) AWS Linux Commands

Linux Commands AWS Linux Commands uname Use to show the kernel name and other information. Synatx Options uname -o (to show OS name) Uname -r (to show kernel version) Uname -v (to show kernel release) uname -n (to show hostname) AWS Linux Commands

Linux Commands AWS Linux Commands echo To print the string on the screen. Also used to create file. Syntax echo string to print echo string to save > file-name echo string to append >> file-name AWS Linux Commands

Linux Commands AWS Linux Commands which To locate the path of command or program. Syntax which command which cp AWS Linux Commands

Linux Commands AWS Linux Commands cal To display calendar. Syntax Options cal -y (to show the complete calendar) cal -m (calendar start from Monday) cal -j (to show Julian calendar) cal -3 (to show previous, current and next month calendar) AWS Linux Commands

Linux Commands AWS Linux Commands wc Print byte, word, and line counts. Syntax wc file-name Options wc -c (to count characters of file) wc -w (to count words of file) wc -l (to count lines of file) AWS Linux Commands

Linux Commands AWS Linux Commands who Print information about users who are currently logged in Syntax Options who -H (out put with heading) who -b (to show boot time) who -r (to show current runlevel) AWS Linux Commands

Linux Commands AWS Linux Commands whoami Show current logged on user on terminal. Syntax AWS Linux Commands

Linux Commands AWS Linux Commands more To display the contents of a file from top to bottom. Syntax more file-name Navigation Keys Enter key Use to page down line by line Space key Use to page down page by page AWS Linux Commands

Linux Commands AWS Linux Commands less To display the contents of the file. We can navigate the page up and down line by line and page by page Syntax less file-name AWS Linux Commands

Linux Commands AWS Linux Commands head To display the first part of the file. Syntax head file-name Options head -n (to show n (number) lines of file) AWS Linux Commands

Linux Commands AWS Linux Commands tail To display the last part of the file. Syntax tail file-name Options tail -n (to show n (number) lines of file) tail -f (to follow the file updating) AWS Linux Commands

Linux Commands AWS Linux Commands | Pipe line. Redirect the output of one command into another command. Syntax commad1 | command2 ls -l | wc -l ls -l /etc | less AWS Linux Commands

Linux Commands AWS Linux Commands history To view the commands line history. Syntax history file-name Options history -c (clear the history) history -w file-name (to save the history in text file) AWS Linux Commands

Linux Commands AWS Linux Commands tac To view the contents of file in reverse order. Syntax tac file-name tac > file-name tac >> file-name AWS Linux Commands

Linux Commands AWS Linux Commands grep To matching pattern. To search the given pattern in file Syntax grep pattern file-name grep pattern file-name1 file-name2 cat file-name | grep pattern Options grep -i (To ignore case sensitivity) grep --color (To high light pattern) AWS Linux Commands

Linux Commands AWS Linux Commands tr To translate the contents of file from lower case to upper case and vise versa. Syntax tr 'a-z' 'A-Z' < file-name cat file-name | tr 'a-z' 'A-Z' cat file-name | tr 'a-z' 'A-Z' > new-file AWS Linux Commands

Linux Commands AWS Linux Commands hostname To view the host/machine name. To change the hostname of your machine. Syntax AWS Linux Commands

Linux Commands AWS Linux Commands ps To view the current running process. ps is the shortage for Process Status. The command should be used to display the currently running processes on Unix/Linux systems ps aux To view the all running system processes. ps -u user-name To view the current running process of given user. AWS Linux Commands

Linux Commands AWS Linux Commands kill Terminate a process. Kill command in Linux is normally used to kill a suspended or hanged process. kill -9 is used to forcefully terminate a process in Linux. Syntax kill -9 process-id AWS Linux Commands

Linux Commands AWS Linux Commands find To search/find the file or directory in current or given directory . Syntax find /path -name file-name (To find a particular file with in current/given directory as well as in its subdirectories) AWS Linux Commands

Linux Commands AWS Linux Commands locate To search/find the location of file-name containing the matching pattern. Syntax locate file-name Options locate -c (to count the given file) locate -I (to search with limit) locate -b (to search file base name) AWS Linux Commands

Linux Commands AWS Linux Commands free To view the memory status. Syntax Options free -l (show memory with detail) free -m (show memory statistics in MBs) free -g (show memory statistics in GBs) AWS Linux Commands

Linux Commands AWS Linux Commands du To view the disk used space of any file/directory. Syntax du directory-name Options du -c (show the grand total) du -h (human readable form) du -s (show only a total size ) AWS Linux Commands

Linux Commands AWS Linux Commands df To view the disk free space. Syntax df directory-name Options df -h (show detail in human readable format) AWS Linux Commands

Linux Commands AWS Linux Commands su To switch an other user account Syntax su user-name Options su - user-name AWS Linux Commands

Linux Commands AWS Linux Commands date To display and change the date and time. Syntax Options date -s “MM/DD/YYYY hh:mm:ss” date -s “DD month YYYY hh:mm:ss” date -s “YYYY-MM-DD hh:mm:ss” date -s “YYYYMMDD hh:mm:ss” AWS Linux Commands

Linux Commands AWS Linux Commands Date format date +%T or +%X (Time) date +%a or +%A (Day) date +%D or +%F or +%x (Date) date +%b or +%B or +%m (Month) date +%G (Year) AWS Linux Commands

Linux Commands AWS Linux Commands & To set as a background job. Ctrl+z Syntax Service-name & AWS Linux Commands

Linux Commands AWS Linux Commands bg jobs To view the all background running jobs. “bg” show the total jobs. “jobs” show the jobs in sequence. Syntax AWS Linux Commands

Linux Commands AWS Linux Commands fg To set a background job as a foreground job. Syntax fg job-num AWS Linux Commands

Linux Commands AWS Linux Commands Redirectors Used to redirect data or contents to given file or new file. Syntax command > file-name command >> file-name Options > (create new file. over write contents if exist a file) >> (Append contents in existing file) AWS Linux Commands

Linux Commands AWS Linux Commands man A command use to view manual or help of linux commands. Syntax man command man cp q (press “q” key to exit from manual) AWS Linux Commands

Linux Commands AWS Linux Commands To re-start the system. halt To shut down the system. poweroff reboot To re-start the system. AWS Linux Commands

Questions & Answers Blog VaporVM 190 Route 27, L2, Edison, NJ08820 OUR EMAIL OUR WEBSITE aws@vaporvm.com http://\www.vaporvm.com http://www.vaporvm.com/us/category/training-blog/ HANDS ON TRAINING