PyOS/os.py

31 lines
799 B
Python

import os
print("[OS] Started up the kernel")
print("[AutoLogin] Logged into user root")
def hello():
print("Hello! You've activated the hello command.")
def help_command():
print("This is the help command. Use --help for assistance.")
def bash_command():
os.system("bash bash.sh")
def custom_terminal():
commands = {
"hello": hello,
"help": help_command,
"bash": bash_command
}
print("Welcome to your custom terminal! Type 'exit' to quit.")
while True:
command = input("root@python $").strip()
if command == "exit":
break
elif command in commands:
commands[command]()
else:
print(f"Unknown command: {command}")
if __name__ == "__main__":
custom_terminal()