Linux Practical Class: Day 1 (Enhanced Notes)

Palak Infotech Computer Institute | लिनक्स का परिचय एवं 20 महत्वपूर्ण Commands


1. Introduction to Linux

Linux is a free and open-source operating system. It manages the hardware and software of a computer and lets you work through a GUI (graphical interface) or a CLI (command-line interface, where you type commands).

Key features

Feature Meaning Hindi
Open Source Source code can be used, studied, and modified ओपन सोर्स
Multiuser Many users can use one system मल्टीयूज़र
Multitasking Several programs run at the same time मल्टीटास्किंग
Secure Permissions and access control protect files सुरक्षा
Portable Runs on many kinds of hardware पोर्टेबल
Stable Reliable for long-running servers स्थिर
CLI Tasks are done by typing commands कमांड लाइन

Popular distributions ("distros")

Ubuntu, Debian, Fedora, Red Hat Enterprise Linux (RHEL), Kali Linux (security testing), Linux Mint (beginner-friendly desktop), Rocky Linux (RHEL-compatible server OS).

Note: All distros share the same Linux kernel. They differ in package managers, default software, and desktop environments.


2. What Is a Linux Command?

A command is an instruction typed into the terminal to do a task. The general structure is:

command  [options/flags]  [arguments]

Example: cp -r notes/ backup/ means command cp, flag -r, source notes/, destination backup/.


3. The 20 Basic Commands

Practice in a practice folder, not in important directories.

# Command Hindi Purpose Example Useful flags
1 pwd वर्तमान पाथ Print the full path of the current directory pwd none needed
2 ls सूची List files and folders ls -l details, -a hidden files, -la both
3 cd डायरेक्टरी बदलें Change directory cd Documents cd alone goes to home, cd - goes back to previous
4 cd .. ऊपर जाएँ Go to parent directory cd .. cd ../.. goes up two levels
5 mkdir फोल्डर बनाएँ Make a directory mkdir students -p creates nested folders: mkdir -p a/b/c
6 touch फाइल बनाएँ Create an empty file, or update its timestamp if it exists touch notes.txt touch a.txt b.txt makes several
7 cat देखें Display file contents cat notes.txt cat -n shows line numbers
8 cp कॉपी करें Copy a file cp notes.txt backup.txt -r for folders: cp -r src/ dest/
9 mv नाम बदलें / ले जाएँ Rename or move mv notes.txt linux.txt mv file.txt folder/ moves it
10 rm हटाएँ Delete a file permanently rm linux.txt -r for folders, -i asks before each delete
11 rmdir खाली फोल्डर हटाएँ Remove an empty directory rmdir students none needed
12 whoami यूज़र नाम Show the current username whoami none needed
13 who लॉगिन यूज़र Show users currently logged in who w gives more detail
14 date तारीख और समय Show system date and time date date "+%d-%m-%Y" formats it
15 uname सिस्टम जानकारी Show kernel name uname -a -r shows kernel version
16 df डिस्क स्पेस Show disk space per filesystem df -h -h = human-readable sizes
17 du फोल्डर का आकार Show size of a folder du -sh students -s summary, -h readable
18 clear स्क्रीन साफ Clear the terminal screen clear shortcut Ctrl + L
19 man मैनुअल Open the manual for a command man ls press q to quit
20 echo टेक्स्ट दिखाएँ Print text echo "Welcome to Linux" echo "text" > file writes to a file, >> appends

Extra notes on the important commands


4. First-Day Practical (Step by Step)

Type these one at a time and check the output of each.

pwd                          # where am I?
ls                           # what is here?
mkdir linux_practice         # make a folder
cd linux_practice            # go into it
touch file1.txt file2.txt    # make two empty files
ls                           # confirm they exist
cp file1.txt backup.txt      # copy file1 to backup
mv file2.txt student.txt     # rename file2
ls                           # check the changes
cat file1.txt                # file is empty, so nothing shows
echo "My first Linux class" > file1.txt   # write text (overwrites)
cat file1.txt                # now the text shows
whoami                       # who am I?
date                         # what time is it?
uname -a                     # system details
cd ..                        # back to the parent folder

Learning outcomes: create folders and files, list contents, copy and rename, write and read text, and check system information.

Challenge: Run cd linux_practice and then rm -r linux_practice from the parent folder. Before doing so, predict what ls will show.


5. Important Rules and Shortcuts

  1. Case-sensitive: ls works, LS does not. Notes.txt and notes.txt are different files.
  2. Tab key: press it to auto-complete file and folder names. Press it twice to see options.
  3. Up/Down arrows: recall earlier commands.
  4. Ctrl + C: stop a running command.
  5. Ctrl + L: clear the screen (same as clear).
  6. Be careful with: rm, sudo (runs as administrator), and commands copied from the internet. Read a command before you press Enter.
  7. No undo: deleted files with rm usually cannot be recovered.
  8. Spaces in names: use quotes or backslashes, e.g. cd "My Folder" or cd My\ Folder.
  9. Distribution differences: some commands or output can vary slightly across distros.

6. Common Mistakes to Avoid


7. Homework

  1. Write the definition of Linux in your own words.
  2. List five features of Linux with an example for each.
  3. Name ten Linux distributions and say one use for each.
  4. For all 20 commands, write the full form or meaning, the syntax, and one example in your notebook.
  5. Create a folder, put two files inside, rename one, copy the other, and then delete everything. Take a screenshot or write down each command you used.
  6. Find the answer: what is the difference between cp and mv?

Palak Infotech Computer Institute: Learn. Skill. Succeed.