0% found this document useful (0 votes)
58 views50 pages

Lesson 01

Uploaded by

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

Lesson 01

Uploaded by

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

Linux+

Exam XK0-005

Copyright © 2022 CompTIA, Inc. All Rights Reserved. | CompTIA.org


1
CompTIA Linux+ Exam XK0-005

Lesson 1
Introducing Linux

Copyright © 2022 CompTIA, Inc. All Rights Reserved. | CompTIA.org


2
Objectives
• Identify Linux characteristics.
• Understand basic interaction with Linux.
• Use help documentation in Linux.
• Identify the troubleshooting methodology.

3
Lesson 1

Topic 1A
Identify Linux Characteristics

Copyright © 2022 CompTIA, Inc. All Rights Reserved. | CompTIA.org


4
Characteristics of Free and Open-Source Software (slide 1)
• Recognize common characteristics, including:
• Free and Open-Source Software (FOSS)
• Distributions
• Command-line Administration

5
Characteristics of Free and Open-Source Software (slide 2)
• Open-source licenses allow: • Open-source license examples:
• Duplication • GNU General Public License (GPL)
• Modification • Apache License 2.0
• Re-release of modified versions • Mozilla Public License
• Sharing

6
History and Philosophy of Unix and Linux (slide 1)
• Unix is an old but commonly-used OS
• Unix versions are called “flavors”

• Unix is closed source

• Linux is licensed as Open-source by the GPL


• Linux versions are purpose-specific and called “distributions”
(distros)

• Windows and macOS are closed source

7
History and Philosophy of Unix and Linux (slide 2)

8
Traits of Linux OS
• Free and Open-source – no licensing fees
• Security – frequently reviewed for vulnerabilities by a large community
• Support – community and vendor support
• Performance/stability – known for high performance and stability
• Software availability – different software from other OSs
• Hardware requirements – may consume fewer resources
• Hardware flexibility – runs on a wide variety of hardware
• Distribution creation – users may create their own distributions to meet needs
• Learning curve – may be higher than GUI-driven OSs
9
Understand Linux Distributions (slide 1)

• FOSS nature allows anyone to create and release a


distribution
• Thousands of distributions
• Most distros are derived from Red Hat Linux or Debian
Linux

10
Understand Linux Distributions (slide 2)

11
Understand Linux Distributions (slide 3)
Common distros Common server deployments
• Fedora Linux • Webserver

• Ubuntu Desktop, Server, Core • Name resolution

• Red Hat Enterprise Linux (RHEL) • File and print

• Linux Mint • Log

• Debian • Virtualization/container host


• Database
• openSUSE
• Cluster
12
Graphical vs. Command-line Interface
• Linux servers are commonly administered from the CLI
• Other OSs are often administered from the GUI
• Linux desktop versions have many GUI options

13
Command-line Interface Comparison
CLI Advantages: CLI Disadvantages:
• Quicker to perform tasks • Learning curve may be higher

• Performance due to consuming • Intimidation by odd command


fewer resources syntax
• Scripting allows complex • Non-intuitive due to obscure
commands to be combined, command names and options
automated, and scheduled
• Inconsistent command structures

14
Common Linux CLIs and GUIs
Common CLIs: Common GUIs:
• Bash (default Linux shell) • GNOME

• ksh – Korn shell • KDE Plasma

• zsh – Z shell • Cinnamon

• MATE

• Many others exist

15
Review Activity: Linux Characteristics
1. Compare the advantages and disadvantages of GUI and CLI
environments.
2. Explain how distributions differ from each other.
3. Why do servers tend to rely on CLI administration and desktops
rely on GUI environments?
4. How might anyone contribute improvements to a piece of free
and open-source software?

16
Lab Activity
• Assisted Lab: Explore the Linux Lab Environment

17
Lesson 1

Topic 1B
Understand Bash Interaction with
Linux

Copyright © 2022 CompTIA, Inc. All Rights Reserved. | CompTIA.org


18
Command Shells
• Provide the CLI
• Verify syntax, process input, provide output
• Bash is the default Linux shell

19
Bash Characteristics and Syntax
Two command structures:
• command –option argument
ls –l /etc
• command subcommand argument
ip addr show eth0

20
Common Bash Commands
ls – List the contents of the
current directory
• ls /tmp

pwd – Display the current working


directory
cd – Change from one directory to
another
• cd /etc

cat – Display the contents of a


text file
• cat data.txt
21
Bash Tab Completion
• Commands
• Directory and file names
• Type in enough to be unique, or press Tab twice to see possible
options

22
Bash History
• Command history is saved in a file
available after reboot
• Type history to see recent
commands
• Use arrow keys to cycle through
history

23
Key Demonstration: Tab Complete and History (slide 1)
Demonstrate tab complete and history:

1. Demonstrate command tab completion by using the history


command.

2. Demonstrate directory and filename tab completion by using


directory and file names (create these resources if necessary).

3. Type history to demonstrate the stored command history.

(continued on next slide)

24
Key Demonstration: Tab Complete and History (slide 2)
(continued from previous slide)

4. Use the up and down arrow keys to demonstrate or practice


cycling through recent commands.

5. Demonstrate using history to correct commands rather than


retyping them.
a. Deliberately mistype the following command: touch
/hme/username/newfile.txt

b. Use the up arrow key to recall the mistyped command, use the left
and right arrow keys to navigate to the error, type o to correct the
spelling of home, and then press ENTER. Such editing is often more
efficient than retyping the entire command.

25
Shell Tips and Tricks
• Tab completion offers speed and reduces typographical errors
• History offers speed
• If you make a mistake in a long command, do not retype the entire
command. Use Up arrow to repeat the command, use the Left and Right
arrows to move to the error, correct the error, and then hit Enter

• Read commands right to left (backwards) to more easily notice


mistakes and missing syntax
• Use the clear command to remove output from the screen

26
Introducing Vim and nano
• Linux settings are stored in text files
• To change settings, edit text files

• Text editors at the CLI do not have menus


• Two common text editors are:
• Vim

• nano

27
Introducing Vim
• Vim modes
• Command mode – keystrokes issue commands to Vim

• Insert mode – keystrokes place text in text files

• Execute mode – keystrokes issue additional commands to Vim

• Change modes
• ESC – takes you to Command mode

• i – takes you from Command mode to Insert mode (as do many other keys)

• : - takes you from Command mode to Execute mode


28
Introducing nano
• nano is simpler than Vim and does not use modes
• Enter text directly in the file
• The Ctrl metakey manages the file
• Ctrl+O – save the file

• Ctrl+X – exit the file and close the text editor

29
Introducing to su and sudo
su sudo
• Complete change of user login • User can exercise a specific
identity delegated privilege
• Usually used to elevate • Usually used to delegate
privileges from a standard user specific tasks to a specific user
to root
• Verifies user against
• Type exit to return to the /etc/sudoers file
original login identity

30
Key Demonstration: su and sudo Commands
Demonstrate the use of some or all of the commands in this section:

1. ls command, then touch, then ls again, and point out the


new file.

2. cat a file for contents.

3. less a long file.

4. Perform a quick demo of Vim and Nano, use cat to display new
contents.

5. Perform a quick demo of su and sudo for lab functionality.

31
Identify Common Directories
• Filesystem Hierarchy Standard (FHS) defines specific directories for
specific content
• Three common directories:
• /home/username – private home directory for each user

• /etc - system configuration files

• /var/log – system and application log files

32
Key Demonstration: Locate Common Directories
Walk through the common directories mentioned in the lesson by
using the ls command:

1. Display the contents of /. Call out the /home, /etc, and /var
directories.

2. Display the /home/user directory for each user account on the


system, indicating that this directory is the starting point for
filesystem navigation.

3. Display the /etc directory, indicating that this directory stores


most configuration files. Call out configuration files related to
networking and SSH.

4. Display the /var/log directory, indicating that this directory


stores log files. Call out a few specific log files for services and the
system. 33
Log In via the GUI and CLI
GUI login CLI Login

34
Review Activity: Interact with Linux
1. An administrator asks you to make a change to the system’s
configuration. Why would you need to use Vim or Nano to
accomplish this task?
2. What types of files will be found in the /etc directory?
3. Explain the difference between the su and sudo commands.

35
Lab Activity
• Assisted Lab: Basic Linux Interaction

36
Lesson 1

Topic 1C
Use Help in Linux

Copyright © 2022 CompTIA, Inc. All Rights Reserved. | CompTIA.org


37
Linux Documentation
• Multiple methods of getting help in Linux
• man pages – primary resource

• Built-in documentation

• Online references

38
Manual Pages
Syntax: man command
• Example: man cd

Navigate man pages:


• Page Up/Down keys to move through the page
• /keyword to conduct a keyword search
• n and p to select the next or previous instance of a keyword search
• q to quit the man page

39
Key Demonstration: Navigate man Pages
Demonstrate the basics of man page use.

1. Show the man ls output.

2. Show the man pwd output

3. Show the man man output

4. Demonstrate how to search a term in a man page.

40
Documentation
Built-in Online
• h • Linux distribution vendors
• whatis • Linux application vendors
• /usr/share/doc • Linux Documentation Project
(LDP)

41
Review Activity: Help in Linux
1. Name three things a man page might provide a user.
2. Why might vendor websites be the best source of information
about an application or service?

42
Lesson 1

Topic 1D
Identify the Linux Troubleshooting
Methodology

Copyright © 2022 CompTIA, Inc. All Rights Reserved. | CompTIA.org


43
Identify the Problem and Determine the Scope

Identify
• Problem surfaced up by end users, log files, monitoring software, server
indicator lights
• Track via ticketing system

Determine Scope
• Gather more information

• Replicate, backup, escalate

44
Establish and Test a Theory of Probable Cause
Question the Obvious
• Is it plugged in?

• Check with other admins

Test the Theory


• If confirmed, establish action plan

• If disproved, establish new theory

45
Establish and Implement a Plan of Action
Establish Plan of Action
• Avoid loss of service

• Notify end users

Implement Solution
• Stick to the plan

• Make one change at a time

• Escalate when needed

46
Verify, Prevent, Analyze, and Document
Verify
• Compare performance to established baselines

Prevent
• Update configurations or implement new technology

Analyze
• What caused the problem in the first place?

Document
• Record findings throughout the troubleshooting process
47
Review Activity: Troubleshoot in Linux
1. A user contacts you to find out why they cannot access a directory.
Using the troubleshooting methodology, how would you narrow
the scope of the problem?
2. When should you escalate a problem?
3. True or False? Documentation should be created only at the end
of the troubleshooting process.

48
Linux+ Exam XK0-005

Lesson 1
Summary

Copyright © 2022 CompTIA, Inc. All Rights Reserved. | CompTIA.org


49
Lesson 1 Guidelines
• FOSS – recognize and describe free and Open-source software, including advantages and
disadvantages
• GPL – understand how the GPL influences the development and availability of Linux
• GUI vs CLI – Understand the advantages and disadvantages of each
• Recognize both command syntax structures:
• command –option argument
• command subcommand argument

• Recognize basic commands: ls, cat, cd, pwd, whoami, touch


• Use Vim and Nano to open, edit, save, and close files
• Use su to elevate privileges to root
• Use sudo to exercise delegated privileges 50

You might also like