{"id":25458925,"url":"https://github.com/ahmad-masud/linux-shell","last_synced_at":"2026-04-20T09:34:40.583Z","repository":{"id":246436457,"uuid":"808802916","full_name":"ahmad-masud/Linux-Shell","owner":"ahmad-masud","description":"💻 A simple Linux shell that supports basic command execution, internal commands, background processes, and command history.","archived":false,"fork":false,"pushed_at":"2024-06-27T20:45:09.000Z","size":58,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-23T08:53:12.243Z","etag":null,"topics":["c","linux","shell"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ahmad-masud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-31T21:17:40.000Z","updated_at":"2024-08-19T00:05:27.000Z","dependencies_parsed_at":"2024-06-28T00:36:50.323Z","dependency_job_id":null,"html_url":"https://github.com/ahmad-masud/Linux-Shell","commit_stats":null,"previous_names":["ahmad-masud/linux-shell"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ahmad-masud/Linux-Shell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmad-masud%2FLinux-Shell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmad-masud%2FLinux-Shell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmad-masud%2FLinux-Shell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmad-masud%2FLinux-Shell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahmad-masud","download_url":"https://codeload.github.com/ahmad-masud/Linux-Shell/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmad-masud%2FLinux-Shell/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32041615,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","linux","shell"],"created_at":"2025-02-18T03:29:02.819Z","updated_at":"2026-04-20T09:34:40.560Z","avatar_url":"https://github.com/ahmad-masud.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Linux Shell\n\nThe shell accepts user commands and executes each command in a separate process, providing basic shell functionalities including process handling, internal commands, and a history feature.\n\n## Features\n\n1. **Command Execution**: Executes user commands in separate child processes using `fork()` and `execvp()`.\n2. **Background Execution**: Allows commands to run in the background by appending `\u0026` at the end of the command.\n3. **Internal Commands**: \n   - `exit`: Exit the shell program.\n   - `pwd`: Display the current working directory.\n   - `cd`: Change the current working directory.\n   - `help`: Display help information on internal commands.\n4. **Shell Prompt**: Displays the current working directory in the shell prompt.\n5. **History Feature**: Maintains a history of the 10 most recent commands.\n   - `history`: Display the 10 most recent commands.\n   - `!n`: Re-run the command numbered `n` from the history.\n   - `!!`: Re-run the previous command.\n   - `!-`: Clear all previous commands from the history.\n6. **Signal Handling**: Custom signal handler for `SIGINT` to display help information when `Ctrl+C` is pressed.\n\n## Getting Started\n\n### Prerequisites\n\n- Linux operating system\n- GCC compiler\n\n### Installation\n\n1. Clone the repository:\n    ```sh\n    git clone https://github.com/ahmad-masud/Linux-Shell\n    cd Linux-Shell\n    ```\n\n2. Build the project:\n    ```sh\n    make\n    ```\n\n3. Run the shell:\n    ```sh\n    ./shell\n    ```\n\n### Usage\n\n- To run a command, simply type it at the prompt and press Enter.\n- To run a command in the background, append `\u0026` at the end of the command.\n- Use internal commands like `pwd`, `cd`, `exit`, and `help` as needed.\n- Use `history` to view recent commands and `!n` to re-run a specific command from the history.\n\n## Example\n\n```sh\n/home/user$ ls -l\n/home/user$ cd /usr\n/usr$ pwd\n/usr\n/usr$ history\n30 history\n29 cd /usr\n28 ls -l\n...\n/usr$ !28\nls -l\n```\n\n## Files\n\n- `shell.c`: Main source code for the shell.\n- `Makefile`: Build instructions for the project.\n- `test_shell.sh`: Testing file for shell.\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmad-masud%2Flinux-shell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahmad-masud%2Flinux-shell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmad-masud%2Flinux-shell/lists"}