Linux-Ubuntu/C2/General-Purpose-Utilities/English

From Script | Spoken-Tutorial
Jump to: navigation, search

Title of the Script: General Purpose Utilities

Author: EduPyramids Team

Keywords: echo, uname, who, passwd, root, Linux utilities, video tutorial.

Prerequisite Tutorial: Structure of Linux Commands


Visual Cue Narration
Slide 1

Title Slide

Welcome to this Spoken tutorial on General Purpose Utilities in Linux.
Slide 2

Learning Objective

In this tutorial we will learn to;
  • Use the echo command with escape sequences
  • Check the Linux kernel version in the system
  • View current and logged-in users and
  • Change the login password.
Slide 3

System Requirements

To record this tutorial, I am using,

Ubuntu OS version 24 point zero 4

Slide 4

Pre-requisites

https://EduPyramids.org

To follow this tutorial,
  • Learners should be familiar with the basic Linux terminal commands.

For the prerequisite Linux tutorials please visit this website.

Slide 5

Code files

The following code file is required to practice this tutorial.

1. gpu-commands.txt

This file is provided in the Code Files link of this tutorial page.

The following code file is required to practice this tutorial.

This file is provided in the Code Files link of this tutorial page.

Screencast:

Press Ctrl, Alt and T keys on your keyboard

Press Ctrl, Alt and T keys on your keyboard to open the terminal.
Type: echo Hello from EduPyramids Let us begin with the echo command.

Type echo space Hello space from space EduPyramids and press Enter.

echo command in Linux is used to display text or output to the terminal.

The message Hello from EduPyramids is displayed as output.

Type: echo -e 'Enter a command\c'and press Enter.

Type clear and press Enter.

Type echo hyphen e space 'Enter a command backslash c' and press Enter.

The -e option allows echo to interpret escape sequences.

Here, \c prevents the cursor from moving to a new line.

As a result, the prompt Enter a command is displayed, and the cursor remains on the same line.

This is useful when we want the user to enter input on the same line.

Let’s clear the screen.

Type: echo -e 'Hello World\n' press Enter. Now let's try the backslash t and backslash n using Hello world as an example.

Type: echo hyphen e 'Hello World backslash n' and press Enter.

The backslash n moves the cursor to a new line.

As a result, the prompt appears on the next line after the output.

type: echo -e 'Hello\nWorld' press Enter Now type: echo hyphen e 'Hello backslash n World' and press Enter.

This command prints Hello and World on two separate lines, one below the other.

Type: echo -e 'Hello\tWorld' press Enter. Type: echo hyphen e 'Hello backslash t World' and press Enter.

This command prints Hello and World with a tab space between them.

Type at the prompt

uname -r

Type: clear and press Enter

To check the Linux kernel version, type uname space hyphen r and press Enter.

The output shows the kernel release version currently running on the system.

Clear the screen.

Type at the prompt

whoami

To know what your username is, without spaces, type whoami and Press Enter.
Type: who and Press Enter. To see the list of users currently logged into the system, type who and press Enter.

The output shows all users who are currently logged in

It displays information such as the username, terminal (seat), display, and login time for each session.

Type at the prompt

passwd and press Enter.

Point to the output.

To change our login password when needed, type: passwd and press Enter
Changing password for username

Current password.

Type the current password

type the new password

Retype the new password to confirm.

Type your current system password when prompted.

Next, type the new password and then retype it to confirm.

If the current password is forgotten, it can still be changed.

The root user, who has administrative privileges, can perform this action.

We will learn about root privileges in the upcoming tutorials.

Slide 6

Summary

In this tutorial we have learnt to

  • Use the echo command with escape sequences
  • Check the Linux kernel version in the system
  • View current and logged-in users
  • Change the login password
With this we come to the end of this tutorial.

Let us summarise.

Slide 7

Assignment

As an assignment, please do the following.

  • Display “Welcome to Linux” using \c, \t, and \n commands.
  • Restart the system and note login details using who command
As an assignment, please do the following.
Slide 8

Thank you

This Spoken Tutorial is brought to you by EduPyramids Educational Services Private Limited SINE IIT Bombay.Thank you.

Contributors and Content Editors

Ketkinaina, Madhurig