https://github.com/armemius/minishell
Miniature shell implementation for Linux
https://github.com/armemius/minishell
cli linux shell
Last synced: 8 months ago
JSON representation
Miniature shell implementation for Linux
- Host: GitHub
- URL: https://github.com/armemius/minishell
- Owner: Armemius
- Created: 2025-01-21T14:27:40.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-23T18:47:19.000Z (over 1 year ago)
- Last Synced: 2025-10-25T06:44:04.957Z (8 months ago)
- Topics: cli, linux, shell
- Language: C++
- Homepage: https://armemius.github.io/MiniShell/
- Size: 156 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MiniShell for Linux
This is a minimal shell implementation for UNIX-like systems. It is a simple
shell that can execute commands, output execution time and display exit status
of the command.
## Internal commands
The shell has a few internal commands that are implemented in the shell itself.
The list will be updated as more commands are added.
- `exit`: Exits the shell.
- `cd`: Changes the current working directory.
- `pwd`: Prints the current working directory.
## External commands
The shell can execute external commands that are available in the system. The
commands are executed using the `execvp` system call. The shell will search for
the command in the directories listed in the `PATH` environment variable.
## Building
If you are willing to try out the shell, you can use the following commands to
build the shell.
```bash
mkdir build
cd build
cmake ..
cmake --build .
```
The built shell will be located in the `./build/apps/shell` directory.
## Installing
You can install the shell using the following command.
```bash
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release .. --target msh
cmake --build .
sudo cmake --install .
```
The shell will be installed in the `/usr/local/bin` directory. You can run it
using the `msh` command.