← Back
Shell - Operating Systems, Linux, Shell
- Source code ℹ️Working on the Project will be uploaded soon.
Shell - A Linux Shell in C
Prerequisites
- Introduction to Operating Systems
- Linux kernal
- Usage of Command Prompt
Description
The Linux Shell Operating System project is a command-line based operating system that provides a lightweight
and efficient environment for users to interact with the underlying Linux kernel. Built around the concept of
a shell, it allows users to execute commands, manage files, run programs, and perform various tasks efficiently
through the terminal interface.
This project is a modification of the original work by Karmanjyot Singh, which focused on karma-Shell OS based on Linux kernal.
I thoroughly studied and analyzed his implementation and made specific
enhancements to tailor it for my Understanding skills of OS and Linux kernal.
Contributions
- Reviewed and understood the existing codebase to grasp the project's architecture and functionality.
- Identified areas of improvement and optimization, resulting in:
- Command Execution Optimization
Refined the command execution process to reduce system call overhead and improve the overall responsiveness of the shell.
This optimization led to faster command execution, enhancing user productivity.
- Kernal-specific system commands
Added kernel-specific system commands to provide users with direct access to kernel features and statistics,
offering deeper insights into system performance and behavior.
Credit
I express my gratitude to Karmanjyot Singh for their pioneering work on the "karma-shell" project.
My contributions to this modified version build upon the original groundwork, and I acknowledge
Karmanjyot Singh for their significant contributions to this project.
Execution Instructions
- run `make` to create an executable `shell`
- run command `./shell` in the terminal , and there the shell runs.
Introduction
This is Linux - C Shell
- To exit the Shell
- Press Ctrl + D , saves the current session history , and exits the terminal
- enter `exit` command in terminal.
- Assumptions
- note that : `max_length` of command names are assumed to be of max-length `name_len` defined in `header.h` as `1024`
- `history` command displays the `10` last commands entered , with latest command on the top.
Shell Features
- The shell supports the following commands being implemented by me : `bg` , `baywatch` , `cd` , `echo` , `fg` , `history` , `jobs` , `ls` , `pinfo` , `pwd` , `replay` , `repeat` , `sig` , and other external `shell commands` .
- It with support for `redirection` operations [ `>` , `<` , `>>` ] and `piping` [ `|` ] .
- Error Handling
- Signal Handling for signals like `SIGINT` , `SIGTSTP` , `SIGCHLD` and external keyboard interrupts like Ctrl +C , Ctrl + Z.
- Running processes in `foreground` & `background` environments along with
- Command `history` implemented, storing the latest commands , that remains saved across shell-sessions.
- Multiple commands separated by `;` handled, However there's no support for handling `"` or `'` ( quotes ).
Command implementation are here [Refer this] and if you want to check out the Ground Work that's here.