Skip to content

A custom Linux shell that integrates kernel-level functionalities, providing extended control and low-level operations beyond standard user-space capabilities.

Notifications You must be signed in to change notification settings

atlaspolat/linux_dash_bash_kernel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Module Initialization and Exit

simple_init Function

  • Creates the proc file.
  • Initializes the module.

simple_exit Function

  • Removes the proc file.
  • Cleans up the module.

Proc File Operations

proc_read Function

  • Reads the proc file and returns process information in the format: <PID_COMM> -> <CHILD_PID_CHILD_COMM>

yaml Copy code

proc_write Function

  • Writes to the proc file and logs the written data.

Task Information

append_task_info Function

  • Recursively appends task information to the buffer, including child processes.

Error Handling

Memory Allocation

  • Checks for successful memory allocation and handles errors by returning -ENOMEM.

File Operations

  • Checks for successful file operations and handles errors by returning -EFAULT.

Process Lookup

  • Checks for successful process lookup and handles errors by returning -ESRCH.

I/O Redirection, Piping, and Command Execution

I/O Redirection

  • Handles input and output redirection by opening the specified files and setting the appropriate file descriptors.

Piping

  • Sets up pipes for command chaining and redirects input and output through the pipes.

Command Execution

  • Uses execv to execute external commands, passing command arguments and environment variables.

Auto-Completion with Tab

Tab Key Handling

  • Searches for matching commands or files when the Tab key is pressed and provides suggestions.

Command and File Search

  • Searches for commands in the PATH environment variable and files in the current directory.

Built-in Commands

kuhex Command

  • Displays the contents of a file in hexadecimal format, with optional grouping.

psvis Command

  • Generates a process tree visualization using the dot tool from Graphviz, loading the kernel module if

About

A custom Linux shell that integrates kernel-level functionalities, providing extended control and low-level operations beyond standard user-space capabilities.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published