|
| 1 | +from tabulate import tabulate |
| 2 | +import time |
| 3 | +from rich.console import Console |
| 4 | +console = Console() |
| 5 | +console.clear() |
| 6 | +print(r"""Developed By: |
| 7 | + __ ___ ______ _ _ ______ ___ |
| 8 | + /_ | |__ \ |____ | | || | |____ | / _ \ |
| 9 | + | | ) | / / | || |_ / / | (_) | |
| 10 | + | | / / / / |__ _| / / > _ < |
| 11 | + | | / /_ / / _ | | _ / / _ | (_) | |
| 12 | + |_| |____| /_/ (_) |_| (_) /_/ (_) \___/""") |
| 13 | +time.sleep(2.5) |
| 14 | +def print_command_info(): |
| 15 | + commands = [ |
| 16 | + ("ssh", "Secure Shell; used to securely connect to a remote server or machine."), |
| 17 | + ("ls", "Lists the contents of a directory."), |
| 18 | + ("pwd", "Prints the working directory; shows the current directory path."), |
| 19 | + ("cd", "Changes the current directory."), |
| 20 | + ("touch", "Creates an empty file or updates the timestamp of an existing file."), |
| 21 | + ("echo", "Displays a line of text or variable value to the terminal."), |
| 22 | + ("nano", "A simple text editor for editing files directly from the terminal."), |
| 23 | + ("vim", "A highly configurable text editor with powerful features."), |
| 24 | + ("cat", "Concatenates and displays file contents."), |
| 25 | + ("shred", "Overwrites a file multiple times to securely delete it."), |
| 26 | + ("mkdir", "Creates a new directory."), |
| 27 | + ("cp", "Copies files or directories from one location to another."), |
| 28 | + ("rm", "Removes (deletes) files or directories."), |
| 29 | + ("rmdir", "Removes empty directories."), |
| 30 | + ("ln", "Creates hard or symbolic links to files or directories."), |
| 31 | + ("clear", "Clears the terminal screen."), |
| 32 | + ("whoami", "Displays the current user’s username."), |
| 33 | + ("useradd", "Adds a new user to the system."), |
| 34 | + ("sudo", "Executes a command with superuser (root) privileges."), |
| 35 | + ("adduser", "Adds a new user and sets up their account."), |
| 36 | + ("su", "Switches the current user to another user, typically the root user."), |
| 37 | + ("exit", "Exits the current shell or terminal session."), |
| 38 | + ("passwd", "Changes the password for a user account."), |
| 39 | + ("apt", "Package management command used to handle packages in Debian-based systems."), |
| 40 | + ("finger", "Displays information about users on the system."), |
| 41 | + ("man", "Displays the manual page for a command."), |
| 42 | + ("whatis", "Provides a short description of a command or function."), |
| 43 | + ("curl", "Transfers data from or to a server using various protocols (e.g., HTTP, FTP)."), |
| 44 | + ("zip", "Compresses files into a ZIP archive."), |
| 45 | + ("unzip", "Extracts files from a ZIP archive."), |
| 46 | + ("less", "Views file contents one screen at a time, allowing backward and forward navigation."), |
| 47 | + ("head", "Displays the first few lines of a file."), |
| 48 | + ("tail", "Displays the last few lines of a file."), |
| 49 | + ("cmp", "Compares two files byte by byte."), |
| 50 | + ("diff", "Compares files line by line and shows differences."), |
| 51 | + ("sort", "Sorts lines of text files."), |
| 52 | + ("find", "Searches for files and directories in a directory hierarchy."), |
| 53 | + ("chmod", "Changes the permissions of a file or directory."), |
| 54 | + ("chown", "Changes the ownership of a file or directory."), |
| 55 | + ("ifconfig", "Displays or configures network interface parameters (older tool, often replaced by ip)."), |
| 56 | + ("ip address", "Displays or configures IP addresses on network interfaces."), |
| 57 | + ("grep", "Searches for patterns within files."), |
| 58 | + ("awk", "A powerful text processing and data extraction tool."), |
| 59 | + ("resolvectl status", "Displays the status of DNS resolver."), |
| 60 | + ("ping", "Tests network connectivity to a host."), |
| 61 | + ("netstat", "Displays network connections, routing tables, and network statistics."), |
| 62 | + ("ss", "Provides detailed information about network sockets."), |
| 63 | + ("iptables", "Configures IP packet filtering rules (used for setting up firewalls)."), |
| 64 | + ("ufw", "Uncomplicated Firewall; simplifies firewall management on Linux systems."), |
| 65 | + ("uname", "Displays system information, such as the kernel version and architecture."), |
| 66 | + ("neofetch", "Displays system information and statistics in a visually appealing way."), |
| 67 | + ("cal", "Displays a calendar."), |
| 68 | + ("free", "Shows memory usage, including total, used, and available memory."), |
| 69 | + ("df", "Displays disk space usage for file systems."), |
| 70 | + ("ps", "Displays information about running processes."), |
| 71 | + ("top", "Provides a real-time view of system processes and resource usage."), |
| 72 | + ("htop", "An interactive process viewer with a more user-friendly interface compared to top."), |
| 73 | + ("kill", "Sends a signal to terminate a process."), |
| 74 | + ("pkill", "Sends a signal to terminate processes based on name or other attributes."), |
| 75 | + ("systemctl", "Controls and manages systemd services and the system state."), |
| 76 | + ("history", "Shows the command history of the terminal session."), |
| 77 | + ("reboot", "Restarts the system."), |
| 78 | + ("shutdown", "Shuts down the system.") |
| 79 | + ] |
| 80 | + |
| 81 | + headers = ["Command", "Description"] |
| 82 | + table = tabulate(commands, headers=headers, tablefmt="grid") |
| 83 | + |
| 84 | + print(table) |
| 85 | + input("Press Enter to exit...") |
| 86 | + |
| 87 | +if __name__ == "__main__": |
| 88 | + print_command_info() |
0 commit comments