Linux operating System Commands

🐧 Working with Console, RPM, and YUM – TYBSc IT Linux Practical Guide (Sem 5)

If you're a TYBSc IT Semester 5 student learning Linux Server Administration, this second practical focuses on using the Linux console (terminal), managing packages via RPM, and handling dependencies using YUM. This step-by-step guide includes real Linux commands with output, perfect for beginners and system admin aspirants.

A) Managing Console and Gaining Privileges

1. Become Root User

su -
Password:
[root@localhost ~]#
    

2. Check Current User

whoami
root
    

3. Show OS Information

cat /etc/redhat-release
Red Hat Enterprise Linux release 8.6 (Ootpa)
    
B) Working With RPM

1. Check RPM Version

rpm --version
RPM version 4.14.3
    

2. Install a Package using RPM

sudo rpm -ivh sample.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:sample-1.0-1.el8                 ################################# [100%]
    

3. Query Installed Packages

rpm -qa
bash-5.0.17-2.el8.x86_64
sample-1.0-1.el8.x86_64
coreutils-8.30-12.el8.x86_64
    
C) Working With YUM

1. Install Package with YUM

sudo yum install httpd
    
Dependencies resolved.
================================================================================
 Package         Arch           Version                Repository         Size
================================================================================
Installing:
 httpd           x86_64         2.4.37-51.module_el8    AppStream         1.4 M

Transaction Summary
================================================================================
Install  1 Package

Installed:
  httpd-2.4.37-51.module_el8.x86_64
    

2. Remove Package with YUM

sudo yum remove httpd
Removed:
  httpd.x86_64 2.4.37-51.module_el8
    

3. Update All Packages

sudo yum update
Dependencies resolved.
Nothing to do.
Complete!
    

✅ This practical covers:

  • ✅ How to use the console, check user permissions, and become root.
  • ✅ Manage software with RPM commands (install, query, verify).
  • ✅ Use YUM to handle packages and resolve dependencies.