SlideShare a Scribd company logo
Linux User Group @ SJSU Linux Commands (Find PocMan on lug-sjsu.org)
Linux User Group at San Jose State University BASH – Bourne Again Shell What is a Shell? Customizing the environment - Local and Environment variables HOME, SHELL, PS1 PATH, LD_LIBRARY_PATH - Aliases alias ll=‘ls –l’ - Command history history, !!, !# - Initialization Scripts .bashrc file
Linux User Group at San Jose State University BASH contd. Redirecting  standard input  < standard output  > standard error  2> Pipes | Command Substitution   `` Wild-Cards * ? [ijk] [!ijk] [x-z]
Linux User Group at San Jose State University Basic File System commands cd – Changing the current directory ls – Listing directory contents mkdir – Making directories rmdir – Removing directories pwd – Checking current directory
Linux User Group at San Jose State University Basic File commands cat – Displaying file contents cp – Copying a file mv – Renaming files rm – Removing files file – Knowing the file types Soft and Hard links
Linux User Group at San Jose State University Backing up files gzip - Compressing Files gunzip - Decompressing Files tar – Archival program
Linux User Group at San Jose State University Basic File Attributes Listing file attributes `ls -l` File Ownership File Permissions Directory Permissions chmod – Changing File ownership
Linux User Group at San Jose State University The Process Basics process commands ps, pstree, top Process states ‘ ctrl z’ – suspend a process ‘ ctrl c’ - kill a process Runnning Jobs in Background  '&' , bg, fg kill - Killing Processes with Signals
Linux User Group at San Jose State University Networking commands/tools Checking the network ping, traceroute, ifconfig, netstat DNS host, nslookup, dig Remote Login telnet, ssh
Linux User Group at San Jose State University Miscellaneous commands man & info who, whoami touch finger, finger <username> whereis, which df, du shutdown
Vi vi  filename [count][command] (count repeats the effect of the command) Vi starts in command mode. The positioning commands operate only while vi is in command mode. You switch vi to input mode by entering any one of several vi input commands. Once in input mode, any character you type is taken to be text and is added to the file. You cannot execute any commands until you exit input mode. To exit input mode, press the escape ( Esc ) key. Linux User Group at San Jose State University
grep What Is grep? Grep is a tool that originated from the UNIX world during the 1970's. It can search through files and folders (directories in UNIX) and check which lines in those files match a given regular expression. Grep will output the filenames and the line numbers or the actual lines that matched the regular expression. All in all a very useful tool for locating information stored anywhere on your computer, even (or especially) if you do not really know where to look.
grep contd.. grep -i – ignores case grep -A Num– prints Num lines after context grep -B Num– prints Num lines before context grep -C Num – prints Num lines around context
Grep contd.. grep -c – returns count of matching lines grep -H – return filenames in which match is found. grep -d type – searching in directories. Where type can be one of the following skip (skip directories specified) recurse (iterate into directories search each file in the directory) read (read directories)
Grep contd.. Regular Expressions [ ] - range of characters * - matches zero or more times + - matches one or more times ^ - beginning of line $ - end of line ? - match is optional and matches at most once {n} – matches n occurrence
Cut To extract information from section from each line of input (usually files) Extraction can be done based on -b – bytes -c – characters -f – fields -d – delimiter (default is tab)
Cut contd.. A range must be provided in order to extract informations. -N – to end of line -M – from beginning of line till M Usually N and M are counted from 1 (not 0). If we specify 0, latest version errors out but previous versions assumes it to be 1.
03/09/10 Linux User Group at San Jose State University By Rohit Surve and Harish Krishnan

More Related Content

ODP
Rpm Introduction
PDF
The Linux Command Cheat Sheet
PDF
3.1.a linux commands reference
PDF
Basic linux commands for bioinformatics
PDF
Basic shell commands by Jeremy Sanders
PDF
Archiving in linux tar
PDF
Linux command line
PPTX
Basic unix
Rpm Introduction
The Linux Command Cheat Sheet
3.1.a linux commands reference
Basic linux commands for bioinformatics
Basic shell commands by Jeremy Sanders
Archiving in linux tar
Linux command line
Basic unix

What's hot (18)

PPT
Linux commands
PPTX
Linux And perl
DOCX
50 most frequently used unix
PDF
Linux basic for CADD biologist
DOCX
50 Most Frequently Used UNIX Linux Commands -hmftj
PDF
Linux cheat sheet
PDF
Linux Common Command
DOCX
Linux basic commands
PPT
101 4.1 create partitions and filesystems
PPT
101 3.4 use streams, pipes and redirects
DOCX
Directories description
PPTX
Basic command of hadoop
PDF
Linux fundamental - Chap 02 perm
PDF
Container security: seccomp, network e namespaces
PDF
Unix Basics Commands
DOC
Unix Basics For Testers
PDF
2.1.using the shell
PDF
Unix commands
Linux commands
Linux And perl
50 most frequently used unix
Linux basic for CADD biologist
50 Most Frequently Used UNIX Linux Commands -hmftj
Linux cheat sheet
Linux Common Command
Linux basic commands
101 4.1 create partitions and filesystems
101 3.4 use streams, pipes and redirects
Directories description
Basic command of hadoop
Linux fundamental - Chap 02 perm
Container security: seccomp, network e namespaces
Unix Basics Commands
Unix Basics For Testers
2.1.using the shell
Unix commands
Ad

Viewers also liked (20)

ODP
Ras pioverview
PDF
Linux fundamental - Chap 16 System Rescue
PPT
Unix tutorial-08
PDF
Chap 18 net
PDF
Linux pipe & redirection
PDF
Chap 17 advfs
PDF
Linux network monitoring hands-on pratice
PDF
Linux fundamentals
PPTX
Basics of-linux
PPT
Power point (asking permission)
PPTX
Unix - Filters/Editors
PDF
Chap 19 web
PDF
Linux fundamental - Chap 13 account management
PDF
Linux fundamental - Chap 05 filter
PDF
Linux fundamental - Chap 09 pkg
PDF
Linux fundamental - Chap 14 shell script
PDF
Importance of linux system fundamental in technical documentation reading
PDF
Linux-Permission
PPT
Linux files and file permission
PPT
Red Hat Certified engineer course
Ras pioverview
Linux fundamental - Chap 16 System Rescue
Unix tutorial-08
Chap 18 net
Linux pipe & redirection
Chap 17 advfs
Linux network monitoring hands-on pratice
Linux fundamentals
Basics of-linux
Power point (asking permission)
Unix - Filters/Editors
Chap 19 web
Linux fundamental - Chap 13 account management
Linux fundamental - Chap 05 filter
Linux fundamental - Chap 09 pkg
Linux fundamental - Chap 14 shell script
Importance of linux system fundamental in technical documentation reading
Linux-Permission
Linux files and file permission
Red Hat Certified engineer course
Ad

Similar to Linux Commands (20)

PDF
Information about linux operating system
PDF
Information about linux operating system
PPT
8.1.intro unix
PPTX
An Introduction to Linux
PPT
PPT
Linux presentation
PPTX
Linux System commands Essentialsand Basics.pptx
DOCX
Unix commands
PPT
Linux Basics
PPT
workshop_1.ppt
PDF
Workshop on command line tools - day 1
PDF
Linux Command Line - By Ranjan Raja
PDF
unix_ref_card.pdf
PDF
unix_ref_card.pdf
PDF
unix_ref_card.pdf
PPT
Introduction to Unix
PDF
Lecture1 2 intro-unix
PDF
Unit 10 investigating and managing
PPT
HISTORY, TYPES OF EMBEDDED LINUX, COMMANDS,
Information about linux operating system
Information about linux operating system
8.1.intro unix
An Introduction to Linux
Linux presentation
Linux System commands Essentialsand Basics.pptx
Unix commands
Linux Basics
workshop_1.ppt
Workshop on command line tools - day 1
Linux Command Line - By Ranjan Raja
unix_ref_card.pdf
unix_ref_card.pdf
unix_ref_card.pdf
Introduction to Unix
Lecture1 2 intro-unix
Unit 10 investigating and managing
HISTORY, TYPES OF EMBEDDED LINUX, COMMANDS,

More from Utkarsh Sengar (7)

PPTX
Python Workshop - Learn Python the Hard Way
PPT
Perl 101 - The Basics of Perl Programming
PPT
Linux Interview Questions Quiz
PPT
Begin With Linux Basics
PPT
Linux User Group @ SJSU Meeting#1
PPT
Hackers The Anarchists Of Our Time
PPTX
SharePoint in Enterprise Collaboration (Education)
Python Workshop - Learn Python the Hard Way
Perl 101 - The Basics of Perl Programming
Linux Interview Questions Quiz
Begin With Linux Basics
Linux User Group @ SJSU Meeting#1
Hackers The Anarchists Of Our Time
SharePoint in Enterprise Collaboration (Education)

Recently uploaded (20)

PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPT
Teaching material agriculture food technology
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
sap open course for s4hana steps from ECC to s4
PDF
cuic standard and advanced reporting.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Review of recent advances in non-invasive hemoglobin estimation
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Unlocking AI with Model Context Protocol (MCP)
NewMind AI Weekly Chronicles - August'25 Week I
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Spectral efficient network and resource selection model in 5G networks
Programs and apps: productivity, graphics, security and other tools
20250228 LYD VKU AI Blended-Learning.pptx
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Teaching material agriculture food technology
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Mobile App Security Testing_ A Comprehensive Guide.pdf
sap open course for s4hana steps from ECC to s4
cuic standard and advanced reporting.pdf

Linux Commands

  • 1. Linux User Group @ SJSU Linux Commands (Find PocMan on lug-sjsu.org)
  • 2. Linux User Group at San Jose State University BASH – Bourne Again Shell What is a Shell? Customizing the environment - Local and Environment variables HOME, SHELL, PS1 PATH, LD_LIBRARY_PATH - Aliases alias ll=‘ls –l’ - Command history history, !!, !# - Initialization Scripts .bashrc file
  • 3. Linux User Group at San Jose State University BASH contd. Redirecting standard input < standard output > standard error 2> Pipes | Command Substitution `` Wild-Cards * ? [ijk] [!ijk] [x-z]
  • 4. Linux User Group at San Jose State University Basic File System commands cd – Changing the current directory ls – Listing directory contents mkdir – Making directories rmdir – Removing directories pwd – Checking current directory
  • 5. Linux User Group at San Jose State University Basic File commands cat – Displaying file contents cp – Copying a file mv – Renaming files rm – Removing files file – Knowing the file types Soft and Hard links
  • 6. Linux User Group at San Jose State University Backing up files gzip - Compressing Files gunzip - Decompressing Files tar – Archival program
  • 7. Linux User Group at San Jose State University Basic File Attributes Listing file attributes `ls -l` File Ownership File Permissions Directory Permissions chmod – Changing File ownership
  • 8. Linux User Group at San Jose State University The Process Basics process commands ps, pstree, top Process states ‘ ctrl z’ – suspend a process ‘ ctrl c’ - kill a process Runnning Jobs in Background '&' , bg, fg kill - Killing Processes with Signals
  • 9. Linux User Group at San Jose State University Networking commands/tools Checking the network ping, traceroute, ifconfig, netstat DNS host, nslookup, dig Remote Login telnet, ssh
  • 10. Linux User Group at San Jose State University Miscellaneous commands man & info who, whoami touch finger, finger <username> whereis, which df, du shutdown
  • 11. Vi vi filename [count][command] (count repeats the effect of the command) Vi starts in command mode. The positioning commands operate only while vi is in command mode. You switch vi to input mode by entering any one of several vi input commands. Once in input mode, any character you type is taken to be text and is added to the file. You cannot execute any commands until you exit input mode. To exit input mode, press the escape ( Esc ) key. Linux User Group at San Jose State University
  • 12. grep What Is grep? Grep is a tool that originated from the UNIX world during the 1970's. It can search through files and folders (directories in UNIX) and check which lines in those files match a given regular expression. Grep will output the filenames and the line numbers or the actual lines that matched the regular expression. All in all a very useful tool for locating information stored anywhere on your computer, even (or especially) if you do not really know where to look.
  • 13. grep contd.. grep -i – ignores case grep -A Num– prints Num lines after context grep -B Num– prints Num lines before context grep -C Num – prints Num lines around context
  • 14. Grep contd.. grep -c – returns count of matching lines grep -H – return filenames in which match is found. grep -d type – searching in directories. Where type can be one of the following skip (skip directories specified) recurse (iterate into directories search each file in the directory) read (read directories)
  • 15. Grep contd.. Regular Expressions [ ] - range of characters * - matches zero or more times + - matches one or more times ^ - beginning of line $ - end of line ? - match is optional and matches at most once {n} – matches n occurrence
  • 16. Cut To extract information from section from each line of input (usually files) Extraction can be done based on -b – bytes -c – characters -f – fields -d – delimiter (default is tab)
  • 17. Cut contd.. A range must be provided in order to extract informations. -N – to end of line -M – from beginning of line till M Usually N and M are counted from 1 (not 0). If we specify 0, latest version errors out but previous versions assumes it to be 1.
  • 18. 03/09/10 Linux User Group at San Jose State University By Rohit Surve and Harish Krishnan