31 lines
791 B
Python
31 lines
791 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")
|
|
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() |