Skip to content

Latest commit

 

History

History
95 lines (58 loc) · 1.82 KB

File metadata and controls

95 lines (58 loc) · 1.82 KB

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 .

License

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