Skip to content

Latest commit

 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MyShell

Linux



C System Calls System Programming

MyShell is an educational Linux mini shell written in C.

The goal of this project is to learn Linux system calls, POSIX APIs, and C system programming by building a simple shell from scratch.

The shell currently supports several basic Unix commands implemented for learning purposes.

Whenever possible, this project uses low-level Linux system calls instead of higher-level library functions to better understand how Unix shells work internally.

This project is still under development, and more features will be added over time to make the shell closer to a real Unix shell.


Features

Commands

  • ls
  • ls -l
  • cat
  • touch
  • mkdir
  • history
  • ./ ( run process )

Redirection

  • >
  • >>
  • <
  • 2>
  • |

Build and run

make

./myshell

Example

myshell> ls

myshell> ls -l

myshell> ls file

myshell> ls -l file

myshell> touch file.txt

myshell> mkdir project

myshell> cat file.txt

myshell> ls > output.txt

myshell> cat < output.txt

myshell> history


myshell> echo hello | cat

About myshell> ./test.c

  • before you run the shell , compile your file you want to run , like test.c in terminal after that you can use ./test.c , it should be in current directory .

Future Work

  • Background execution (&)
  • Environment variables
  • Wildcards (*)
  • Built-in commands ( export, unset, env)

License

This project is released under the MIT License and is intended for educational purposes.# myshell-linux-mini-shell

About

MyShell , mini Unix Shell written in C, featuring featuring command execution, built-in commands, PATH resolution, I/O redirection, and process management using Linux system calls.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages