JHPrk / my_linux_shell

linux custom shell written in C. Using Linux dependent system calls..

Repository from Github https://github.comJHPrk/my_linux_shellRepository from Github https://github.comJHPrk/my_linux_shell

Explanation

This custom shell only works in Linux System
It runs Linux system call such as execvp(), fork(), etc.
To execute this code in other Operation System such as Windows, Mac OS, you need to change OS dependent codes listed above.
Implementation is based on the book, Operation System Concepts Nineth Edition.

Compile In Linux

Using gcc to compile the code
codes are written in c

  • gcc -o [compile_name] [source_code]
  • Run with ./[compile_name]

Commands

  • cd
  • other commands supported by execvp

Custom Commands

  • history : Shows commands history up to HISTORY_SIZE
  • ! n : Execute nth history commands
  • !! : Execute last commands executed

Debug Modes

  • To investigate flow of the codes, you set constant variable at line 15, DEBUG_MODE to 1 and run, default val : 0

Todo

  • Pipe instruction

About

linux custom shell written in C. Using Linux dependent system calls..


Languages

Language:C 100.0%