Lab Rep 2 Intro To Rob
Lab Rep 2 Intro To Rob
(MTS-417)
DE-43 Mechatronics
Syndicate – B
LAB Report
BASIC LINUX COMMANDS
Group Members:
NC MUHAMMAD ABDULLAH ANWAR
Reg # 370057
Reg # 375104
1
Table of Contents
INTRODUCTION .......................................................................................................................... 3
Key Features of Linux: ................................................................................................................ 3
Uses of Linux: ............................................................................................................................. 4
Components of Linux:................................................................................................................. 4
Why Use Linux?.......................................................................................................................... 4
TASK .............................................................................................................................................. 5
Basic Linux commands: .............................................................................................................. 5
1. mkdir (Make Directory) .................................................................................................... 5
2. cd (Change Directory) ......................................................................................................... 5
3. ls (List Files) ........................................................................................................................ 5
4. touch (Create a File.............................................................................................................. 5
5. rm (Remove File/Directory) ................................................................................................ 6
6. cp (Copy Files/Directories) ................................................................................................. 6
7. mv (Move/Rename Files/Directories) ................................................................................. 6
8. sudo (Run as Superuser) ...................................................................................................... 6
9. apt (Package Manager for Debian/Ubuntu) ......................................................................... 6
10. pwd (Print Working Directory) ......................................................................................... 7
11. chmod (Change Permissions) ............................................................................................ 7
12. chown (Change Ownership) .............................................................................................. 7
13. ps (Process Status) ............................................................................................................. 7
14. kill (Terminate Process)..................................................................................................... 7
15. df (Disk Free)..................................................................................................................... 7
16. du (Disk Usage) ................................................................................................................. 8
17. cat (Concatenate and Display Files) .................................................................................. 8
18. grep (Search in Files) ......................................................................................................... 8
19. man (Manual Pages) .......................................................................................................... 8
20. echo (Print Text) ................................................................................................................ 8
IMPLEMENTATION ..................................................................................................................... 9
CONCLUSION ............................................................................................................................. 10
2
INTRODUCTION
Linux is an open-source operating system (OS) based on the Unix architecture. It is a system
software that manages hardware resources, provides a user interface, and acts as a platform for
running applications. Like other operating systems (e.g., Windows, macOS), Linux controls how
computer hardware (CPU, memory, storage, etc.) interacts with software applications.
1. Open Source: Linux is free and open source, meaning anyone can access, modify, and
distribute its code. This has resulted in a large, active community of developers and users.
2. Kernel-Based: At the core of Linux is the Linux kernel, the fundamental part that
controls hardware communication, memory management, and other system resources.
3. Multiuser and Multitasking: Linux allows multiple users to work on the same system
simultaneously and can run multiple processes at the same time.
4. Security: Linux is considered more secure than many other operating systems due to its
design, permissions structure, and active community.
5. Distributions (Distros): Linux is not a single OS, but a family of operating systems
called distributions (or "distros"). Examples include Ubuntu, Fedora, Debian, CentOS,
and Arch Linux. Each distro has its own set of features, package management, and
default applications.
6. Command-Line Interface (CLI): While Linux can have graphical interfaces (GUIs),
many Linux users interact with the system via the command-line interface (CLI),
providing more control over tasks.
3
Uses of Linux:
• Servers: Linux is widely used in server environments (web, database, and mail servers)
due to its stability, performance, and security.
• Development: Developers often use Linux for programming because of its support for
multiple programming languages, tools, and environments.
• Desktop OS: While not as widely used on desktops compared to Windows or macOS,
Linux distros like Ubuntu and Linux Mint offer user-friendly interfaces.
• Embedded Systems: Linux powers many embedded systems such as smart TVs, routers,
and other IoT devices.
Components of Linux:
1. Kernel: The core component that interacts with the hardware and manages system
resources.
2. Shell: A program that provides the user with a command-line interface to interact with
the system.
3. File System: Linux has a hierarchical file system, where everything (files, directories,
devices) is treated as a file.
4. Package Management: Linux uses package managers (e.g., APT, YUM, Pacman) to
install, update, and remove software.
• Customization: Linux allows for extensive customization of both the appearance and
functionality of the system.
• Performance: Linux systems are lightweight and can run efficiently even on older
hardware.
4
• Cost-Effective: Linux is free to use, which makes it an attractive option for personal,
enterprise, and educational purposes.
TASK
Make a Report including Linux commands you have learnt such as make directory, cd,
update, install etc.
2. cd (Change Directory)
3. ls (List Files)
5
5. rm (Remove File/Directory)
6. cp (Copy Files/Directories)
7. mv (Move/Rename Files/Directories)
6
• What it does: Manages packages, including updates, installation, and removal.
7
16. du (Disk Usage)
These are fundamental Linux commands that can help us navigate and manage our system
effectively.
8
IMPLEMENTATION
We have attached the output of these commands after performing them in our system.
9
CONCLUSION
In conclusion, we learned that Linux is a powerful, open-source operating system with a wide
range of features that make it suitable for various environments, including servers, desktops, and
embedded systems. We explored the fundamentals of Linux, including its kernel-based
architecture, command-line interface, and multiuser capabilities. Additionally, we covered
essential Linux commands such as mkdir, cd, sudo, apt, and others, which help manage files,
directories, processes, and system updates. The flexibility, security, and extensive community
support make Linux an excellent choice for users ranging from beginners to advanced
developers.
10