SlideShare a Scribd company logo
1 of 21
Download to read offline
RedHat Enterprise Linux Essential
Unit 2: Running commands and Getting Help
Unit 2 : Running commands and Getting Help
   Running Commands
   Some Simple commands
   Getting Help
   The whatis Command
   The --help option
   Reading Usage summaries
   The man command
   Navigating man Pages
   The info command
   Navigating info Pages
   Extended Documentation
   RedHat Documentation
Running Commands


 Commands have the following syntax:

  command [options] [arguments]

 Each item is separated by a space

 Options modify the command's behavior

      Word options ussually proceded by “--“

      Single-leeter options usually preceded by "-“

      can be passed as "-a -b -c" or "-abc“

 Arguments are filenames or other data needed by the command
Some Simple Commands


 su - username : change user ( or su username)

 id username       shows information on the current user

 date - display date and time

 cal - display calendar
Getting Help

 Don't try to memories everthing!
 Many levels of help
   Whatis
   <command> --help
   man and info
   /usr/share/doc
   Red Hat documentation
The whatis command


 Display short descriptions of commands

  ex: whatis ls
The --help option


 Displays usage summary and argument list

 Used by most, but not all, commands

  Ex:       ls --help
Reading Usage Summaries


 Printed by --help, man and others

 Used to describe the syntax of a command
    Arguments in "[ ]" are optional

    Arguments in "<>" are variables

    x|y|z means "x or y or z”

    -abc mean "any mix of -a, -b or -c"
The man command


 Provides command descriptions or manuals

 Almost every command has a man "page“

 Pages are grouped into "chapters“

 Collectively referred to as the Linux Manual

            man [<chapter>] <command>
Navigating man Pages


 While viewing a man page
   Navigate with arrows, pgUp, pgDown

   /<text>                Search for text
   n/N                    Next/Privous match
   q                      Quit viewing page

 Searching the Manual
   man -k <keyword>       List all matching pages
The info command


 Similar to man, but offten more in-depth

 info pages are structured like a web site

    Each page is divided into "nodes”

    Links to nodes are preceded by "*"


              info <command>
Navigating info Pages


 While viewing an info page
    Navigate with arrows, pgUp, pgDown

    Tab             move the next link
    Enter           Follow link the cursor is on
    n/p/u           View next/previous/up-one node
    s[<text>]       Search for text
    Ctr + S         Search for next text
    q               Quit vewing page
Extended Documentation




/usr/share/doc
Redhat Documentation Doc




http://www.redhat.com/docs
Sequence 1: Using the Help Tools
 1. Look at the command-line options for the man command. What man option can be
   used to search the name of every manual page for a keyword and list the matches
   (the same behavior as whatis)?
 2. What man option can be used to search the name and short description of every
   manual page for a keyword and list the matching pages?
 3. What man option can be used to search the entire text (not just the names and
   short descriptions) of the manual for a keyword, displaying the matching pages one
   at a time?
 4. Suppose you wanted to view the man page for the basename function of the C
   programming language, as opposed to that of the basename command. How might
   you do that? HINT: C functions are discussed in chapter 3 of the manual
Sequence 1: Using the Help Tools
 5. What command-line options might you use to cause ls to display a long
  listing of files with human-readable size descriptions (i.e., 6.8M instead of
  6819467)? HINT: You will need two command-line options.
 6. Given the usage description below, which of the following would be a
  syntactically valid invocation of the command foo?

               foo -x|-y [-abcde] FILENAME...
               a. foo -x -y -a one.txt

               b. foo

               c. foo -y -abc one.txt two.txt

               d. foo -abc one.txt two.txt three.txt
Sequence 2: Solving Problems with man
Scenario:       You want to change /etc/issue again (see previous lab). This
                time you want to see if there is an escape to make it print the
                system's hostname.

1. Begin by consulting the man page for /etc/issue

        [vmintam@localhost ~]$ man issue

   Note that it says escape characters are dependent upon mingetty. Note
   also the reference to mingetty(8) in the See Also section.Exit the man page
   by pressing q.

2. Continue your search by looking at the mingetty man page. Do you need to
   specify chapter 8 when requesting the page? Why or why not?
Sequence 2: Solving Problems with man
3. Jump to the section on escapes by typing

  /escape

  Your cursor should be on the heading ISSUE ESCAPES. If it is not, press n
  to move between matches until it is. This section discusses the escape
  sequences introduced in a previous exercise.



4. Which escape represents the system's hostname?
Sequence 2: Solving Problems with man
3. Jump to the section on escapes by typing

  /escape

  Your cursor should be on the heading ISSUE ESCAPES. If it is not, press n
  to move between matches until it is. This section discusses the escape
  sequences introduced in a previous exercise.



4. Which escape represents the system's hostname?
Sequence 2: Solving Problems with man
5. Open /etc/issue in nano

   [root@localhost ~]# nano /etc/issue

6. Change the welcome message you added previously to include the hostname
   escape. /etc/issue should now look similar to this:
    Welcome to n!

    Red Hat Enterprise Linux Server release 5

    Kernel r on an m

7. Save the file and exit nano by pressing Ctrl-x.

8. Log out by closing your shell with the exit command. This should drop you
   back to a new and improved login prompt! Try accessing other virtual terminals
   and seeing how the prompt changes. Remember that you may need to press
   Enter to see an updated prompt.
Here are the answers to the questions in Sequence 2:2. No, you do not need to specify chapter 8 when requesting the mingetty man page. Man pages are grouped into numbered sections (chapters), but you do not need to specify the chapter number unless there is a name conflict between commands and sections. 4. The \h escape represents the system's hostname

More Related Content

What's hot

Linux for CS Majors
Linux for CS MajorsLinux for CS Majors
Linux for CS Majorsworr1244
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269tutorialsruby
 
Basic linux commands for bioinformatics
Basic linux commands for bioinformaticsBasic linux commands for bioinformatics
Basic linux commands for bioinformaticsBonnie Ng
 
User and groups administrator
User  and  groups administratorUser  and  groups administrator
User and groups administratorAisha Talat
 
Unix Basics 04sp
Unix Basics 04spUnix Basics 04sp
Unix Basics 04spDr.Ravi
 
linux-commandline-magic-Joomla-World-Conference-2014
linux-commandline-magic-Joomla-World-Conference-2014linux-commandline-magic-Joomla-World-Conference-2014
linux-commandline-magic-Joomla-World-Conference-2014Peter Martin
 
Productivity tips - Introduction to linux for bioinformatics
Productivity tips - Introduction to linux for bioinformaticsProductivity tips - Introduction to linux for bioinformatics
Productivity tips - Introduction to linux for bioinformaticsBITS
 
Using the MS Windows Command Line
Using the MS Windows Command LineUsing the MS Windows Command Line
Using the MS Windows Command Lineadil raja
 
Directory Commands - R.D.Sivakumar
Directory Commands - R.D.SivakumarDirectory Commands - R.D.Sivakumar
Directory Commands - R.D.SivakumarSivakumar R D .
 

What's hot (20)

Basic C L I
Basic  C L IBasic  C L I
Basic C L I
 
ppt on cmd cammand
ppt on cmd cammandppt on cmd cammand
ppt on cmd cammand
 
Linux for CS Majors
Linux for CS MajorsLinux for CS Majors
Linux for CS Majors
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
 
Dos
DosDos
Dos
 
MS-DOS
MS-DOSMS-DOS
MS-DOS
 
Basic linux commands for bioinformatics
Basic linux commands for bioinformaticsBasic linux commands for bioinformatics
Basic linux commands for bioinformatics
 
BASIC COMMANDS OF LINUX
BASIC COMMANDS OF LINUXBASIC COMMANDS OF LINUX
BASIC COMMANDS OF LINUX
 
User and groups administrator
User  and  groups administratorUser  and  groups administrator
User and groups administrator
 
Unix Basics 04sp
Unix Basics 04spUnix Basics 04sp
Unix Basics 04sp
 
Sahul
SahulSahul
Sahul
 
Linux comands for Beginners
Linux comands for BeginnersLinux comands for Beginners
Linux comands for Beginners
 
linux-commandline-magic-Joomla-World-Conference-2014
linux-commandline-magic-Joomla-World-Conference-2014linux-commandline-magic-Joomla-World-Conference-2014
linux-commandline-magic-Joomla-World-Conference-2014
 
Msdos crash course
Msdos crash courseMsdos crash course
Msdos crash course
 
Productivity tips - Introduction to linux for bioinformatics
Productivity tips - Introduction to linux for bioinformaticsProductivity tips - Introduction to linux for bioinformatics
Productivity tips - Introduction to linux for bioinformatics
 
Sahu
SahuSahu
Sahu
 
Using the MS Windows Command Line
Using the MS Windows Command LineUsing the MS Windows Command Line
Using the MS Windows Command Line
 
Se meu elefante falasse
Se meu elefante falasseSe meu elefante falasse
Se meu elefante falasse
 
Directory Commands - R.D.Sivakumar
Directory Commands - R.D.SivakumarDirectory Commands - R.D.Sivakumar
Directory Commands - R.D.Sivakumar
 
Linux Basics
Linux BasicsLinux Basics
Linux Basics
 

Viewers also liked

Unit 4 user and group
Unit 4 user and groupUnit 4 user and group
Unit 4 user and grouproot_fibo
 
Unit 6 bash shell
Unit 6 bash shellUnit 6 bash shell
Unit 6 bash shellroot_fibo
 
Unit 11 configuring the bash shell – shell script
Unit 11 configuring the bash shell – shell scriptUnit 11 configuring the bash shell – shell script
Unit 11 configuring the bash shell – shell scriptroot_fibo
 
Unit 13 network client
Unit 13 network clientUnit 13 network client
Unit 13 network clientroot_fibo
 
Unit 9 basic system configuration tools
Unit 9 basic system configuration toolsUnit 9 basic system configuration tools
Unit 9 basic system configuration toolsroot_fibo
 
Administration 1 sw2012
Administration 1 sw2012Administration 1 sw2012
Administration 1 sw2012Lin Liyue
 
Unit 12 finding and processing files
Unit 12 finding and processing filesUnit 12 finding and processing files
Unit 12 finding and processing filesroot_fibo
 

Viewers also liked (7)

Unit 4 user and group
Unit 4 user and groupUnit 4 user and group
Unit 4 user and group
 
Unit 6 bash shell
Unit 6 bash shellUnit 6 bash shell
Unit 6 bash shell
 
Unit 11 configuring the bash shell – shell script
Unit 11 configuring the bash shell – shell scriptUnit 11 configuring the bash shell – shell script
Unit 11 configuring the bash shell – shell script
 
Unit 13 network client
Unit 13 network clientUnit 13 network client
Unit 13 network client
 
Unit 9 basic system configuration tools
Unit 9 basic system configuration toolsUnit 9 basic system configuration tools
Unit 9 basic system configuration tools
 
Administration 1 sw2012
Administration 1 sw2012Administration 1 sw2012
Administration 1 sw2012
 
Unit 12 finding and processing files
Unit 12 finding and processing filesUnit 12 finding and processing files
Unit 12 finding and processing files
 

Similar to Here are the answers to the questions in Sequence 2:2. No, you do not need to specify chapter 8 when requesting the mingetty man page. Man pages are grouped into numbered sections (chapters), but you do not need to specify the chapter number unless there is a name conflict between commands and sections. 4. The \h escape represents the system's hostname

Similar to Here are the answers to the questions in Sequence 2:2. No, you do not need to specify chapter 8 when requesting the mingetty man page. Man pages are grouped into numbered sections (chapters), but you do not need to specify the chapter number unless there is a name conflict between commands and sections. 4. The \h escape represents the system's hostname (20)

Chapter 3 Using Unix Commands
Chapter 3 Using Unix CommandsChapter 3 Using Unix Commands
Chapter 3 Using Unix Commands
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Red hat linux essentials
Red hat linux essentialsRed hat linux essentials
Red hat linux essentials
 
The structure of Linux - Introduction to Linux for bioinformatics
The structure of Linux - Introduction to Linux for bioinformaticsThe structure of Linux - Introduction to Linux for bioinformatics
The structure of Linux - Introduction to Linux for bioinformatics
 
Linux Cheat Sheet.pdf
Linux Cheat Sheet.pdfLinux Cheat Sheet.pdf
Linux Cheat Sheet.pdf
 
NYPHP March 2009 Presentation
NYPHP March 2009 PresentationNYPHP March 2009 Presentation
NYPHP March 2009 Presentation
 
Linux introductory-course-day-1
Linux introductory-course-day-1Linux introductory-course-day-1
Linux introductory-course-day-1
 
COMMAND.pptx
COMMAND.pptxCOMMAND.pptx
COMMAND.pptx
 
IntroCommandLine.ppt
IntroCommandLine.pptIntroCommandLine.ppt
IntroCommandLine.ppt
 
IntroCommandLine.ppt
IntroCommandLine.pptIntroCommandLine.ppt
IntroCommandLine.ppt
 
60761 linux
60761 linux60761 linux
60761 linux
 
Linux programming - Getting self started
Linux programming - Getting self started Linux programming - Getting self started
Linux programming - Getting self started
 
Linuxppt
LinuxpptLinuxppt
Linuxppt
 
Nithi
NithiNithi
Nithi
 
02 linux desktop usage
02 linux desktop usage02 linux desktop usage
02 linux desktop usage
 
Linuxppt
LinuxpptLinuxppt
Linuxppt
 
Linuxppt
LinuxpptLinuxppt
Linuxppt
 
Group13
Group13Group13
Group13
 
Using Unix Commands.pptx
Using Unix Commands.pptxUsing Unix Commands.pptx
Using Unix Commands.pptx
 
Using Unix Commands.pptx
Using Unix Commands.pptxUsing Unix Commands.pptx
Using Unix Commands.pptx
 

Recently uploaded

How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

Here are the answers to the questions in Sequence 2:2. No, you do not need to specify chapter 8 when requesting the mingetty man page. Man pages are grouped into numbered sections (chapters), but you do not need to specify the chapter number unless there is a name conflict between commands and sections. 4. The \h escape represents the system's hostname

  • 1. RedHat Enterprise Linux Essential Unit 2: Running commands and Getting Help
  • 2. Unit 2 : Running commands and Getting Help  Running Commands  Some Simple commands  Getting Help  The whatis Command  The --help option  Reading Usage summaries  The man command  Navigating man Pages  The info command  Navigating info Pages  Extended Documentation  RedHat Documentation
  • 3. Running Commands  Commands have the following syntax: command [options] [arguments]  Each item is separated by a space  Options modify the command's behavior  Word options ussually proceded by “--“  Single-leeter options usually preceded by "-“  can be passed as "-a -b -c" or "-abc“  Arguments are filenames or other data needed by the command
  • 4. Some Simple Commands  su - username : change user ( or su username)  id username shows information on the current user  date - display date and time  cal - display calendar
  • 5. Getting Help  Don't try to memories everthing!  Many levels of help  Whatis  <command> --help  man and info  /usr/share/doc  Red Hat documentation
  • 6. The whatis command  Display short descriptions of commands ex: whatis ls
  • 7. The --help option  Displays usage summary and argument list  Used by most, but not all, commands Ex: ls --help
  • 8. Reading Usage Summaries  Printed by --help, man and others  Used to describe the syntax of a command  Arguments in "[ ]" are optional  Arguments in "<>" are variables  x|y|z means "x or y or z”  -abc mean "any mix of -a, -b or -c"
  • 9. The man command  Provides command descriptions or manuals  Almost every command has a man "page“  Pages are grouped into "chapters“  Collectively referred to as the Linux Manual man [<chapter>] <command>
  • 10. Navigating man Pages  While viewing a man page  Navigate with arrows, pgUp, pgDown  /<text> Search for text  n/N Next/Privous match  q Quit viewing page  Searching the Manual  man -k <keyword> List all matching pages
  • 11. The info command  Similar to man, but offten more in-depth  info pages are structured like a web site  Each page is divided into "nodes”  Links to nodes are preceded by "*" info <command>
  • 12. Navigating info Pages  While viewing an info page  Navigate with arrows, pgUp, pgDown  Tab move the next link  Enter Follow link the cursor is on  n/p/u View next/previous/up-one node  s[<text>] Search for text  Ctr + S Search for next text  q Quit vewing page
  • 15. Sequence 1: Using the Help Tools  1. Look at the command-line options for the man command. What man option can be used to search the name of every manual page for a keyword and list the matches (the same behavior as whatis)?  2. What man option can be used to search the name and short description of every manual page for a keyword and list the matching pages?  3. What man option can be used to search the entire text (not just the names and short descriptions) of the manual for a keyword, displaying the matching pages one at a time?  4. Suppose you wanted to view the man page for the basename function of the C programming language, as opposed to that of the basename command. How might you do that? HINT: C functions are discussed in chapter 3 of the manual
  • 16. Sequence 1: Using the Help Tools  5. What command-line options might you use to cause ls to display a long listing of files with human-readable size descriptions (i.e., 6.8M instead of 6819467)? HINT: You will need two command-line options.  6. Given the usage description below, which of the following would be a syntactically valid invocation of the command foo? foo -x|-y [-abcde] FILENAME... a. foo -x -y -a one.txt b. foo c. foo -y -abc one.txt two.txt d. foo -abc one.txt two.txt three.txt
  • 17. Sequence 2: Solving Problems with man Scenario: You want to change /etc/issue again (see previous lab). This time you want to see if there is an escape to make it print the system's hostname. 1. Begin by consulting the man page for /etc/issue [vmintam@localhost ~]$ man issue Note that it says escape characters are dependent upon mingetty. Note also the reference to mingetty(8) in the See Also section.Exit the man page by pressing q. 2. Continue your search by looking at the mingetty man page. Do you need to specify chapter 8 when requesting the page? Why or why not?
  • 18. Sequence 2: Solving Problems with man 3. Jump to the section on escapes by typing /escape Your cursor should be on the heading ISSUE ESCAPES. If it is not, press n to move between matches until it is. This section discusses the escape sequences introduced in a previous exercise. 4. Which escape represents the system's hostname?
  • 19. Sequence 2: Solving Problems with man 3. Jump to the section on escapes by typing /escape Your cursor should be on the heading ISSUE ESCAPES. If it is not, press n to move between matches until it is. This section discusses the escape sequences introduced in a previous exercise. 4. Which escape represents the system's hostname?
  • 20. Sequence 2: Solving Problems with man 5. Open /etc/issue in nano [root@localhost ~]# nano /etc/issue 6. Change the welcome message you added previously to include the hostname escape. /etc/issue should now look similar to this: Welcome to n! Red Hat Enterprise Linux Server release 5 Kernel r on an m 7. Save the file and exit nano by pressing Ctrl-x. 8. Log out by closing your shell with the exit command. This should drop you back to a new and improved login prompt! Try accessing other virtual terminals and seeing how the prompt changes. Remember that you may need to press Enter to see an updated prompt.