As a Computer Systems Analyst, proficiency in command prompt and Linux commands can significantly enhance your efficiency and troubleshooting capabilities. Here are some essential and advanced commands that can help you:
Windows Command Prompt Commands
- System Information and Management
- systeminfo: Displays detailed configuration information about a computer and its operating system.
- ipconfig: Displays all current TCP/IP network configuration values.
- tasklist: Lists all running processes.
- taskkill: Terminates tasks by process ID (PID) or image name.
- sfc /scannow: Scans and repairs system files.
- File and Directory Management
- dir: Lists files and directories.
- cd: Changes the current directory.
- mkdir: Creates a new directory.
- del: Deletes one or more files.
- copy: Copies files from one location to another.
- move: Moves files from one location to another.
- robocopy: Robust file copy utility with many options for copying files and directories (advanced replacement for xcopy).
- Network Troubleshooting
- ping: Checks connectivity to a specific IP address or hostname.
- tracert: Traces the route taken by packets to reach a destination.
- netstat: Displays network statistics and connections.
- nslookup: Queries DNS servers.
- arp: Displays and modifies the IP-to-Physical address translation tables.
- System Monitoring
- taskmgr: Opens Task Manager.
- eventvwr: Opens Event Viewer to check system logs.
- perfmon: Opens Performance Monitor.
Linux Commands
- System Information and Management
- uname -a: Displays all system information.
- df -h: Shows disk space usage in a human-readable format.
- free -h: Displays memory usage in a human-readable format.
- top or htop: Displays real-time system performance statistics.
- ps aux: Lists all running processes.
- kill [PID]: Terminates a process by its PID.
- File and Directory Management
- ls -lah: Lists files and directories with detailed information.
- cd: Changes the current directory.
- mkdir: Creates a new directory.
- rm -rf: Recursively removes directories and their contents (use with caution).
- cp -r: Copies files and directories recursively.
- mv: Moves or renames files and directories.
- find: Searches for files and directories.
- tar -czvf archive.tar.gz /path/to/directory: Archives and compresses files.
- Network Troubleshooting
- ping: Checks connectivity to a specific IP address or hostname.
- traceroute: Traces the route taken by packets to reach a destination.
- netstat -tuln: Displays listening ports and their associated programs.
- ifconfig or ip addr: Displays network interface configuration.
- nslookup: Queries DNS servers.
- ssh user@hostname: Connects to a remote machine via SSH.
- System Monitoring and Logging
- dmesg: Prints kernel and boot messages.
- tail -f /var/log/syslog: Monitors system log in real-time.
- journalctl: Queries and displays logs from systemd journal.
- User and Permissions Management
- sudo: Executes a command with superuser privileges.
- chmod: Changes file permissions.
- chown: Changes file owner and group.
- usermod -aG group user: Adds a user to a group.
Advanced Tools and Scripts
- Automation and Scripting
- Batch Scripting (Windows): Create .bat or .cmd files to automate repetitive tasks.
- Shell Scripting (Linux): Use bash scripts (.sh) to automate tasks.
- PowerShell (Windows): Advanced scripting and automation tool.
- Version Control
- git: Version control system for tracking changes in files and coordinating work on those files among multiple people.
- Text Processing and Data Manipulation
- grep: Searches text using patterns.
- awk: Pattern scanning and processing language.
- sed: Stream editor for filtering and transforming text.