"use client" import React, { useState } from "react" import Link from "next/link" import { Terminal, ArrowLeft, Copy, Check } from "lucide-react" import { Button } from "@/components/ui/button" import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table" import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "@/components/ui/accordion" export default function SystemCommandsPage() { const [viewMode, setViewMode] = useState<"table" | "accordion">("table") // Group commands by category for better organization const commandGroups = [ { title: "System Information", commands: [ { command: "pveversion", description: "Show Proxmox version" }, { command: "pveversion -v", description: "Detailed Proxmox version info" }, { command: "hostnamectl", description: "System hostname and kernel info" }, { command: "uname -a", description: "Kernel and architecture info" }, { command: "cat /etc/os-release", description: "OS release details" }, ], }, { title: "System Status", commands: [ { command: "uptime", description: "System uptime" }, { command: "uptime -p", description: "Pretty uptime format" }, { command: "free -h", description: "RAM and swap usage" }, { command: "who -b", description: "Last system boot time" }, { command: "last -x | grep shutdown", description: "Previous shutdowns" }, ], }, { title: "Service Management", commands: [ { command: "systemctl status pveproxy", description: "Check Proxmox Web UI status" }, { command: "systemctl restart pveproxy", description: "Restart Web UI proxy" }, { command: "journalctl -xe", description: "System errors and logs" }, { command: "dmesg -T | tail -n 50", description: "Last 50 kernel log lines" }, ], }, { title: "User Information", commands: [ { command: "whoami", description: "Current user" }, { command: "id", description: "Current user UID, GID and groups" }, { command: "who", description: "Logged-in users" }, { command: "w", description: "User activity and uptime" }, { command: "uptime && w", description: "Uptime and who is logged in" }, { command: "cut -d: -f1,3,4 /etc/passwd", description: "All users with UID and GID" }, { command: "getent passwd | column -t -s :", description: "Readable user table (UID, shell, etc.)" }, ], }, ] return (
This section provides a collection of essential system commands for managing and monitoring your Proxmox VE system. Each command is accompanied by a brief description of its function.
{cmd.command}
{cmd.description}