Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MyShell

Linux



C Linux POSIX System Calls System Programming GNU Readline MIT License

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)
  • HTML/CSS project documentation

License

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

About

small shell , build basic command to learn more about c , linux .

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages