SlideShare a Scribd company logo
Linux basic 1&2
by Hideo
login/logout
•login : input user account and password
•logout : input exit
2
The difference between Windows and Linux
Windows Linux
Paid license Free license
GUI (Graphical User Interface) CUI (Character User Interface)
Remote Desktop teratermpro
Client & Server Server
3
Directory Structure
•Directory is a hierarchical structure in
which an apex "/" (the root directory)).
/
usr
local
bin
home var etc
user1 user2
4
Basic Command
•pwd : print working directory
•ls : list
•ls -l : list detail
•ls -a : list (include hidden file)
•cd : change directory
5
Notation of directory
Directory is a hierarchical structure in
which an apex "/" (the root directory)).
・absolute path :
/usr/local/bin, /home/test
・relative path :
../test (.. : parent directory)
./local (. : current directory)
6
Basic Command 2
•cp : copy
•mv : move or rename
•touch : make empty file
•mkdir : make directory
•rm : remove file(directory)
•rmdir : remove directory
•man : manual
7
Basic Command 3
•cat : display the contents of a file
•cat -n : grant the line number
•head : display the first ten lines of a file
•tail : display the last ten lines of a file
•grep : searches files for specified words
•wc : word count
8
Redirection(<>) & Pipe(|)
•command > file : redirecting the output
•command >> file : appending a file
•command < file : redirecting the input
•command1 | command2 : pipe the output
of command1 to the input of command2
•who : list users currently logged in
•sort : sort data
9
vi command (text editor)
vi launches in command mode.
Press i to enter insert mode.
Press escape to exit insert mode.
Type :wq and press enter to save the file and quit.
command mode
insert mode
Esc
i
(a,o)
:wq : save file & quit
10
Main command mode commands
•$ : go to the end of the current row
•^(hat) : go to the first character of the
current row
•G : go to the end of the file
•nG : go to 'n' row of the file
11
Main command mode commands2
•i : insert mode (before the cursor)
•a : insert mode (after the cursor)
•o : insert mode (under the current row)
•x : delete one character
•nx : delete 'n' characters
•r : replace character
12
Main command mode commands3
•yy : copy the current row
•nyy : copy ‘n’ row
•p : paste the copied row
•dd : delete the whole row
•ndd : delete 'n' rows
•/string : find the next string 'string'
13
Confirmation Test
• 1. move to /home/test using absolute path.
• 2. move to your homedir using relative path.
14
Confirmation Test 2
• 1. copy /etc/passwd to under your homedir.
• 2. modify copy file
- find next word “operator”
- replace “operator” to “test”
- save & quit
15
Reference
• UNIX Tutorial for Beginners
• vi tutorial for beginners
16

More Related Content

PPTX
Lightning talk: Go
PPTX
Next Generation Language Go
PPTX
Linux Basic commands and VI Editor
DOCX
Exmaples of file handling
PPT
Sample file processing
PPTX
Introduction to Go
PDF
When RegEx is not enough
PDF
PHP file handling
Lightning talk: Go
Next Generation Language Go
Linux Basic commands and VI Editor
Exmaples of file handling
Sample file processing
Introduction to Go
When RegEx is not enough
PHP file handling

What's hot (20)

PPTX
Linux command for beginners
PDF
Basic linux commands
PDF
Clojure functions
PDF
PDF
Php file handling in Hindi
PPTX
Naughty And Nice Bash Features
PPTX
Macros code for Protecting and Unprotecting Sheets
PPTX
Code tacoma command_line
PDF
XML namespaces and XPath with Python
PDF
Ast transformations
PDF
Python 3.x File Object Manipulation Cheatsheet
PPTX
Php File Operations
ODP
Introduction to Python3 Programming Language
PPT
PHP - Introduction to File Handling with PHP
PPTX
Basics of Unix Adminisration
DOCX
Linux final exam
PPTX
Data file operations in C++ Base
PPTX
Unix cmd on_free_bsd
DOCX
Php files
Linux command for beginners
Basic linux commands
Clojure functions
Php file handling in Hindi
Naughty And Nice Bash Features
Macros code for Protecting and Unprotecting Sheets
Code tacoma command_line
XML namespaces and XPath with Python
Ast transformations
Python 3.x File Object Manipulation Cheatsheet
Php File Operations
Introduction to Python3 Programming Language
PHP - Introduction to File Handling with PHP
Basics of Unix Adminisration
Linux final exam
Data file operations in C++ Base
Unix cmd on_free_bsd
Php files
Ad

Similar to Linux basic1&amp;2 (20)

PPTX
Linux basics part 1
PPTX
Linux Commands all presentation file .pptx
PPTX
Linux System commands Essentialsand Basics.pptx
PPTX
Commands and shell programming (3)
PPTX
Operating System Laboratory presentation .ppt
DOC
58518522 study-aix
PDF
LinuxCommands (1).pdf
PPT
02 linux desktop usage
PPT
HISTORY, TYPES OF EMBEDDED LINUX, COMMANDS,
PPTX
Unix Shell Script - 2 Days Session.pptx
PDF
PPT
redhat_by_Cbitss.ppt
PDF
Presentation aix basic
PPT
Linux Basics
PPS
QSpiders - Unix Operating Systems and Commands
PPT
linux-commands.ppt
PPT
linux-commands.ppt
PPT
Linux commands
PPT
linux-commands.ppt
PPT
linux-commands.ppt
Linux basics part 1
Linux Commands all presentation file .pptx
Linux System commands Essentialsand Basics.pptx
Commands and shell programming (3)
Operating System Laboratory presentation .ppt
58518522 study-aix
LinuxCommands (1).pdf
02 linux desktop usage
HISTORY, TYPES OF EMBEDDED LINUX, COMMANDS,
Unix Shell Script - 2 Days Session.pptx
redhat_by_Cbitss.ppt
Presentation aix basic
Linux Basics
QSpiders - Unix Operating Systems and Commands
linux-commands.ppt
linux-commands.ppt
Linux commands
linux-commands.ppt
linux-commands.ppt
Ad

More from Hideo Amezawa (10)

PDF
JICA国際協力出前講座ーアフリカの国際的な支援からの自立に向けて
PPTX
Windows server
PPTX
Network
PPTX
PPTX
Linux basic3
PPTX
Ansible
ODP
カミーノ・デ・サンティアゴ
ODP
Japan overseas cooperation volunteers
ODP
青年海外協力隊のブログサイト
ODP
JICA国際協力出前講座ーアフリカの国際的な支援からの自立に向けて
Windows server
Network
Linux basic3
Ansible
カミーノ・デ・サンティアゴ
Japan overseas cooperation volunteers
青年海外協力隊のブログサイト

Recently uploaded (20)

PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
TR - Agricultural Crops Production NC III.pdf
PPTX
Institutional Correction lecture only . . .
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
Basic Mud Logging Guide for educational purpose
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Classroom Observation Tools for Teachers
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
Lesson notes of climatology university.
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Pharmacology of Heart Failure /Pharmacotherapy of CHF
TR - Agricultural Crops Production NC III.pdf
Institutional Correction lecture only . . .
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Basic Mud Logging Guide for educational purpose
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
O7-L3 Supply Chain Operations - ICLT Program
102 student loan defaulters named and shamed – Is someone you know on the list?
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
O5-L3 Freight Transport Ops (International) V1.pdf
Classroom Observation Tools for Teachers
Abdominal Access Techniques with Prof. Dr. R K Mishra
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Module 4: Burden of Disease Tutorial Slides S2 2025
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Lesson notes of climatology university.

Linux basic1&amp;2

  • 2. login/logout •login : input user account and password •logout : input exit 2
  • 3. The difference between Windows and Linux Windows Linux Paid license Free license GUI (Graphical User Interface) CUI (Character User Interface) Remote Desktop teratermpro Client & Server Server 3
  • 4. Directory Structure •Directory is a hierarchical structure in which an apex "/" (the root directory)). / usr local bin home var etc user1 user2 4
  • 5. Basic Command •pwd : print working directory •ls : list •ls -l : list detail •ls -a : list (include hidden file) •cd : change directory 5
  • 6. Notation of directory Directory is a hierarchical structure in which an apex "/" (the root directory)). ・absolute path : /usr/local/bin, /home/test ・relative path : ../test (.. : parent directory) ./local (. : current directory) 6
  • 7. Basic Command 2 •cp : copy •mv : move or rename •touch : make empty file •mkdir : make directory •rm : remove file(directory) •rmdir : remove directory •man : manual 7
  • 8. Basic Command 3 •cat : display the contents of a file •cat -n : grant the line number •head : display the first ten lines of a file •tail : display the last ten lines of a file •grep : searches files for specified words •wc : word count 8
  • 9. Redirection(<>) & Pipe(|) •command > file : redirecting the output •command >> file : appending a file •command < file : redirecting the input •command1 | command2 : pipe the output of command1 to the input of command2 •who : list users currently logged in •sort : sort data 9
  • 10. vi command (text editor) vi launches in command mode. Press i to enter insert mode. Press escape to exit insert mode. Type :wq and press enter to save the file and quit. command mode insert mode Esc i (a,o) :wq : save file & quit 10
  • 11. Main command mode commands •$ : go to the end of the current row •^(hat) : go to the first character of the current row •G : go to the end of the file •nG : go to 'n' row of the file 11
  • 12. Main command mode commands2 •i : insert mode (before the cursor) •a : insert mode (after the cursor) •o : insert mode (under the current row) •x : delete one character •nx : delete 'n' characters •r : replace character 12
  • 13. Main command mode commands3 •yy : copy the current row •nyy : copy ‘n’ row •p : paste the copied row •dd : delete the whole row •ndd : delete 'n' rows •/string : find the next string 'string' 13
  • 14. Confirmation Test • 1. move to /home/test using absolute path. • 2. move to your homedir using relative path. 14
  • 15. Confirmation Test 2 • 1. copy /etc/passwd to under your homedir. • 2. modify copy file - find next word “operator” - replace “operator” to “test” - save & quit 15
  • 16. Reference • UNIX Tutorial for Beginners • vi tutorial for beginners 16

Editor's Notes

  • #3: タイトル : 60px content : 40px
  • #5: Directory = folder Hierarchical structure:階層構造 Apex:頂点
  • #9: grant:付与
  • #11: launche:起動する
  • #12: $ cp /etc/group $HOME/ $ vi group
  • #15: # mkdir /home/test