0% found this document useful (0 votes)
43 views16 pages

11.1 MasteringLinuxCommandLine - v2.0 - 01 - GettingStarted - Handouts

The document provides an overview of a course on mastering the Linux command line. It outlines topics that will be covered in the course such as Linux system architecture, file systems, files and directories, I/O redirection, users and groups, permissions, editors, regular expressions, and more. It encourages students to complete assignments, quizzes and tests to fully learn the material and gain long-term benefits. A brief history of Linux and Unix is also presented.

Uploaded by

amit_post2000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views16 pages

11.1 MasteringLinuxCommandLine - v2.0 - 01 - GettingStarted - Handouts

The document provides an overview of a course on mastering the Linux command line. It outlines topics that will be covered in the course such as Linux system architecture, file systems, files and directories, I/O redirection, users and groups, permissions, editors, regular expressions, and more. It encourages students to complete assignments, quizzes and tests to fully learn the material and gain long-term benefits. A brief history of Linux and Unix is also presented.

Uploaded by

amit_post2000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

11/19/2019

Mastering Linux Command-line

Course Overview
GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

Course Overview
 Linux System Architecture  Understanding Links
 Linux File System  The Process
 Working with Files & Directories  Scheduling Jobs
 Standard I/O & Redirection  Tools & Utilities
 Linux Users & Groups – Concepts  Connecting to Linux Machines
 File Attributes and Permissions  Customizing Shell Environment
 The vi Editor – Introduction  Shell Scripting - Intro
 Regular Expressions  Appendix & Miscellaneous
 Filters & Searching

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

Course Overview
 Quizzes
 Assignments
 PDF resources
 Sample data files
 Links to Internet Resources
 Tests (@ the end)

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

1
11/19/2019

How to get best out of this course?


 Access to a Linux System (Physical, Virtual or Cloud)
 VirtualBox Installation
 Create Virtual Machine & Install Ubuntu
 Create AWS Account, Linux EC2 Instance & SSH to EC2 instance.
 Do not skip Quizzes
 Do not skip assignments
 Do not skip tests
 The more you _practice_ the better
 Learn once, and you will reap the benefits for the years to come.

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

Linux History

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

Linux – What is it?


 Operating System  Powers:
 Command Line  Servers
 GUI  Routers/Switches
 Desktop/Laptops
 Electronic Devices
 etc.

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

2
11/19/2019

You might have heard….


 Sun Solaris
 Linux
 IBM AIX
 Redhat Linux
 HP-UNIX
 Etc.

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

History
Year Event
1965 Massachusetts Institute of Technology (MIT), General Electric (GE) and Bell Labs of AT&T
worked on a joint project called Multics, with an intention to develop a multi-user operating
system.
1969 Ken Thompson, Dennis Ritchie & others started working on a PDP-7 at AT&T Bell Labs.
1974 V4 - Re-written in C.
1975 V6 was made available outside Bells Labs.
University of California Berkeley took this as the first version of UNIX for their R&D.
1983 AT&T released “System V”
1984 UC Berkeley released BSD 4.2.
1989 AT&T released “System V, Release 4”

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

History
Year Event

1991 Linus Torvalds (Finland) announced Linux.

1994 Linux 1.0 Kernel was released

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

3
11/19/2019

Unix/Linux Flavors
 BSD  Ubuntu  Linux
 IBM AIX  Redhat
 Oracle Solaris  CentOS
 HP-UX  Fedora
 SCO  MAC OS

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

10

Many Unix Flavors – WHY?


 AT&T could not legally sell.
 BSD was released to public for free.

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

11

Questions…

Who wrote the initial version of Unix Operating System?

Who wrote Linux Kernel ?

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

12

4
11/19/2019

Linux System Architecture

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

13

Linux System Architecture


Applications
 Hardware
Shell
 Kernel
Kernel
 Shell
 Applications Hardware

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

14

Features of Linux Operating System


 Multi-tasking
 Multi-user
 Highly Portable
 Hierarchical File System
 Shell
 Security

 Everything is treated as files – Files, Folders, Memory, I/O devices etc.

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

15

5
11/19/2019

Applications of Linux Operating System


 OS – Laptops, Desktops & Servers
 OS – Routers, Switches etc.
 Mobile Phones
 Smart Watches
 Smart TVs
 IoT Devices
 etc

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

16

Questions…

Which component interacts with the hardware?

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

17

Types of Shells

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

18

6
11/19/2019

Types of Shells
 Bourne Shell (sh)
Most
 C Shell (csh) Common
Applications
 Korn Shell (ksh)
Shell
 Bourne-Again Shell (bash)
Kernel
 Zsh
 Fish – Friendly Interactive Shell Hardware

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

19

Remember…
 You can have more than one shell install on a system.
 You can switch between shells on a system.

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

20

Questions…

What is the most common shell in the Linux world?

Can you have multiple shells installed on a Linux system?

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

21

7
11/19/2019

Lab Setup

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

22

Lab Environment
 Local System
 Local Virtual Machine
 VirtualBox
 VmWare Workstation
 Cloud Environment
 AWS
 Azure

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

23

Lab Environment

Appendix & Miscellaneous Section

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

24

8
11/19/2019

Connecting To a Linux System

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

25

Getting Connected
 Local
 Remote Protocols
 Telnet
 SSH
 TFTP
 FTP

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

26

Connecting Locally
 Boot Linux OS.
 You need:
 Username
 Password

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

27

9
11/19/2019

Connecting Remotely
 Remote Client – Command-line
 Telnet (Not Secure)
 SSH (Secure)
 Putty Telnet/SSH
 Bitvise Client
 Etc.

 Remote Client - GUI


 VNC
 TigerVNC
 TeamViewer
 Credentials
 Dameware
 Username
 Etc.
 Password
GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

28

On The Remote Linux Machine


 ssh Server must be installed and running.
 VNC or TeamViewer or similar software.

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

29

Connecting Remotely - Putty


 Putty

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

30

10
11/19/2019

Questions…

What is the common tool that is used to connect to a Linux machine


from a windows system?

Can you open multiple SSH sessions using the same user credential
from some location or different location?

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

31

Linux Command Structure

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

32

Linux Commands

 Program written to perform specific action.


 All commands are written using lower case.
 Example: ls, cd
 Commands can have 0, 1 or more arguments.

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

33

11
11/19/2019

Linux Command Structure


$ command –argument1 –argument2 –argument3

Example:
$ ls
$ ls –l
$ ls –l –a (or ls –la)

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

34

Some Basic Commands


Command Purpose Command Purpose
ls List the contents of a directory banner Display the banner message
cd Change directory echo Used to display messages
cat Used to display messages bc Calculator
who Lists the users connected to the system
tput Control the movement of the cursor on the
screen
tty Displays the terminal file
uname Displays computer information
date Displays the date
cal Prints calendar
passwd Change the password
hostname Displays the computer name

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

35

Directory Commands

pwd cd
 Present Working Directory  Change Directory
 Navigating through the file system

mkdir rmdir
 Make Directory  Remove Directory

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

36

12
11/19/2019

Questions…
Can you remove/delete a non-empty directory using the command
“rmdir”?

What happens when you run “cd” command with no arguments?

How do you determine the computer name?


GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

37

Directory Commands
 Present Working Directory
 Displays the current location

pwd
 Example:
 $ pwd

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

38

Directory Commands
 Change Directory
 Navigating through the file system

cd  Example:
 $ cd /var/log
$ cd $ cd -

$ cd ~ $ cd ..

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

39

13
11/19/2019

Directory Commands
 Make Directory (i.e creating)

mkdir  Example:
 $ mkdir myproject
 $ mkdir /home/mary/myproject

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

40

Directory Commands
 Remove Directory (i.e deleting)

rmdir  Example:
 $ rmdir myproject
 $ rmdir /home/mary/myproject

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

41

Getting Help!

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

42

14
11/19/2019

“man” command
 “man” command

 Example:
 $ man ls

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

43

man page – Sections (Type of Entry)


Section Description
1 General Commands
2 System Calls
3 Library functions, covering in particular the C standard library
4 Special files (usually devices, those found in /dev) and drivers
5 File formats and conventions
6 Games and screensavers
7 Miscellaneous
8 System administration commands and daemons

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

44

Getting Help
 man
 man –k [string]
 --help
 [command] TAB TAB
 apropos
 whatis

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

45

15
11/19/2019

Questions…
How would you list all the commands that start with “ls”?
ls{TAB}{TAB}

Which command is used to search the manual?


man –k or apropos

What is the syntax to display help for the command “ifconfig”?


GlobalETraining.com
man ifconfig
Mastering Linux Command Line GlobaleTraining.com

46

Internal Commands External Commands

 Built-in commands of the shell  Not Built-in commands.


 No additional process.  Stored as separate files
 Speed  High  Separate sub-process.
 Example:  Speed  slower than Built-in
cd, pwd, echo  Example:
 ls, mv, cat

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

47

16

You might also like