Video summary

Linux for Beginners in One Video 🔥 100 Commands Explanation [HINDI] | MPrashant

Main summary

Key takeaways

Educational

Summary

The video is a practical introduction to using the Linux command line. The presenter demonstrates how to navigate the filesystem, inspect and edit files, search and process text, manage software and services, handle users and permissions, monitor system resources, and perform basic networking and process-management tasks. Examples are run in a terminal, with some commands intended for an online practice environment.

Main Ideas and Command Guide

1. Getting Oriented in the Terminal

  • pwd displays the current working directory.
  • whoami prints the currently logged-in username. The terminal prompt may also show the username, hostname, and current folder.
  • date displays the current date and time. Format codes can show particular parts, such as only the date or time.
  • ls lists files and directories:
    • ls -l shows a detailed listing.
    • ls -lt sorts by modification time, newest first.
    • ls -ltr reverses that order, putting the newest entries at the bottom.
    • ls -lh displays file sizes in a human-readable format.
    • In a detailed listing, - indicates a regular file and d indicates a directory.
  • clear clears the terminal. Ctrl+L is a keyboard shortcut for the same task.

2. Reading, Searching, and Editing Files

  • cat prints a file’s contents to the terminal.
  • less opens a file for scrollable viewing:
    • /word searches forward; ?word searches backward.
    • n moves to the next match.
    • G jumps to the end; g jumps to the beginning.
    • q exits.
  • more displays a file page by page; q exits.
  • The presenter demonstrates both vi and nano for editing:
    • In vi, press i to enter insert mode, then Esc, followed by :wq to save and quit.
    • In nano, make edits, use Ctrl+X to exit, and confirm whether to save.
  • Shell tab completion can complete a partially typed filename or command.

3. Creating, Deleting, and Moving Files and Directories

  • touch filename creates an empty file.
  • rm filename removes a file.
  • mkdir dirname creates a directory.
  • rmdir dirname removes an empty directory.
  • cd dirname changes directory; cd .. moves up one level. Multiple .. components can move up several levels.
  • Linux paths:
    • An absolute path starts from the root directory, /.
    • A relative path is expressed from the current directory.
    • . represents the current directory.
    • ~ represents the current user’s home directory.
  • cp source destination copies a file.
  • mv source destination moves a file; it can also rename one.
  • The video also demonstrates copying a file’s contents into another file.
  • Wildcards help select matching names:
    • * matches a sequence of characters, such as files beginning with a particular letter or ending in .csv.
    • Brace expansion can generate a series of names, for example file{1..10}.

4. Text Searching, Sorting, and Transforming

  • head -n 5 file displays the first five lines; tail -n 5 file displays the last five.
  • sort file sorts lines; sort -r file sorts them in reverse order.
  • A pipe (|) sends one command’s output to another. For example, sorting text and piping it to uniq can remove adjacent duplicates.
  • split -l N file prefix divides a file into chunks containing a specified number of lines.
  • grep pattern file finds matching lines. The presenter also demonstrates searching for multiple patterns.
  • shuf file randomizes the order of a file’s lines.
  • wc -l file counts lines.
  • cmp file1 file2 reports whether files differ; diff file1 file2 shows line-level differences.
  • find path -name pattern searches for files by name and is case-sensitive unless configured otherwise.
  • locate pattern searches a file index quickly. The index may need updating with updatedb, which generally requires administrative privileges.
  • awk can select columns from delimited data. For a comma-separated file, the example uses a comma as the field separator and prints a chosen field.
  • cut -c extracts character positions from lines.
  • sed -n '5p' file prints a particular line; substitution expressions can replace text in displayed output.
  • tr can convert lowercase text to uppercase, or vice versa.
  • truncate -s size file changes a file’s size, which is useful when creating a file of a chosen size for testing.
  • fold -w N wraps long lines at a specified width.

5. Getting Help and Using Shell Utilities

  • history lists previously entered commands. The output can be filtered to find earlier uses of a command.
  • help provides help for shell built-ins. Piping long output through less or more makes it easier to inspect.
  • man command opens the manual page for a command.
  • which command identifies the executable path that will be used.
  • bc provides a simple command-line calculator.
  • cal displays a calendar, including for a specified year.
  • script filename records terminal activity in a file for later reference.
  • alias creates a shortcut for a longer command. A command-line alias is temporary; persistent shell settings can be placed in a user’s .bashrc file and loaded with source.

6. Archives, Downloads, and Software Installation

  • zip and unzip compress and extract files.
  • For directories, the presenter demonstrates using tar to create a compressed archive and extract it again.
  • wget URL downloads a file from the internet. The video also shows requesting a web endpoint and printing its response in the terminal.
  • Package installation depends on the Linux distribution:
    • The examples mention apt for Debian- and Ubuntu-based systems and yum or dnf for Red Hat-based systems.
    • Installation may require sudo or root access.
    • Package-manager commands can also list installed or available packages.

7. Services, Environment Variables, and Administrative Access

  • systemctl manages system services:
    • systemctl status service checks a service’s state.
    • systemctl start service and systemctl stop service start or stop it.
    • The video also demonstrates listing services.
  • Environment variables store values that programs and the shell can use. The presenter illustrates setting JAVA_HOME and updating PATH to select a Java installation.
  • An export command sets variables in the current shell session. To make settings persist for a user, add them to .bashrc and load the file with source.
  • su switches to another user, such as root, and exit returns to the previous shell.
  • sudo runs a command with elevated privileges, but only users authorized by the administrator can use it.

8. Remote Access, File Transfer, and Permissions

  • The video demonstrates connecting to a remote machine using its host information and transferring a file with scp. A destination is specified in the form user@host:path.
  • File permissions are shown as three groups for the owner, group, and others:
    • r means read, w means write, and x means execute.
    • chmod changes permissions. Symbolic forms can add or remove permissions for the owner, group, or others.
    • chown changes a file’s owner; chgrp changes its group.
  • If access is denied, inspect the permissions and ownership. Changes to protected files may require root privileges.

9. Monitoring System Resources and Processes

  • free displays memory use; a human-readable option makes the figures easier to interpret.
  • top provides a live view of processes and resource use.
  • du reports disk usage for a directory and its contents.
  • df reports filesystem capacity, used space, and available space.
  • hostname displays the machine’s name.
  • lscpu provides CPU details; uname -a displays system and kernel information; lsblk lists block devices and partitions.
  • ps lists processes. The video filters this output with grep to look for a specific process.
  • pgrep can find process IDs by process name.
  • kill can stop a process by ID; forceful termination should be used cautiously. The presenter also demonstrates stopping a process by name.
  • jobs lists jobs associated with the current shell:
    • Ctrl+Z suspends a foreground job.
    • bg resumes a suspended job in the background.
    • fg brings a background job to the foreground.
  • nohup command & runs a command so it can continue in the background after the shell session ends.
  • The video also demonstrates scheduling a one-time command with at, then using Ctrl+D to submit the job.

10. Basic Networking and User Administration

  • ifconfig is used to inspect network-interface information and IP addresses.
  • ping host checks connectivity to a host; packet loss can indicate a connectivity problem.
  • The video mentions checking whether a network port is accessible and whether a service is listening, using tools such as nc and netstat.
  • traceroute host shows the network hops taken toward a destination.
  • User and group administration examples include:
    • useradd to create a user and passwd to set that user’s password.
    • id to display a user’s ID and group memberships.
    • groupadd to create a group.
    • usermod to modify a user’s group membership.
    • userdel and groupdel to delete users or groups, subject to system requirements.
  • The examples reinforce that user creation, group assignment, password changes, and other administrative operations may require root or sudo access.

11. Redirecting Command Output

  • > sends command output to a file, replacing its existing contents.
  • >> appends output to the end of a file.
  • The presenter demonstrates redirecting command results into files and distinguishes between overwriting and appending.

Speakers or Sources Featured

  • M. Prashant — the presenter and narrator, explaining and demonstrating the commands.
  • Terminal demonstrations — command output from the Linux environment is shown throughout; no other identifiable speaker is featured.

Rate this summary

Your feedback will help improve summaries.

Improve this summary

Reprocess with a stronger model when the summary feels incomplete or inaccurate.

Pro

Translate summary in another language

Pro

Ask questions to this video

Chat for follow-up questions, clarifications, and source-backed answers.

Coming soon

Share this summary

Original video