A growing list of commands I've used and what they do in no specific order
sudo snap install bw
ps aux | grep java
whoami
ip addr show
uptime
sudo apt update && sudo apt upgrade -y
cat /etc/os-release
sudo apt-get install needrestart
sudo reboot
sudo needrestart
sudo ckan sysadmin add {name}
sudo ckan sysadmin list
sudo ckan user list
sudo ckan --config /etc/ckan/default/ckan.ini config validate
hstr
sudo nano /etc/ckan/default/ckan.ini
exit
Here's a breakdown of what each of these terminal commands do in Ubuntu
sudo snap install bw
Purpose: Installs the Bitwarden command-line interface (CLI).
Use Case: Useful for managing passwords and secrets securely from the terminal. It's helpful in automated scripts or for system administrators who prefer to work within a command line environment.
ps aux | grep java
Purpose: Searches for all processes that mention "java".
Use Case: Handy for developers or administrators to check if Java applications are running, identify their process IDs (PIDs), and monitor resource usage.
whoami
Purpose: Displays the current user's username.
Use Case: Useful in scripts or when logged into multiple terminals or user sessions to confirm which user account you're operating under.
ip addr show
Purpose: Lists all network interfaces and their associated IP addresses.
Use Case: Essential for network configuration and troubleshooting. It helps determine which IPs are assigned to your machine.
uptime
Purpose: Shows how long the system has been running since the last reboot.
Use Case: Good for monitoring system stability and performance over time, often used in system health checks.
hstr
Purpose: Provides an enhanced view of the command history, allowing for searching and recalling previously used commands.
Use Case: Increases efficiency in the terminal by making it easier to reuse complex commands or troubleshoot past actions.
sudo apt update && sudo apt upgrade -y
Purpose: Updates the list of package sources and then upgrades all the installed packages.
Use Case: Crucial for maintaining software updates, including security patches and improvements, ensuring the system is protected against known vulnerabilities.
cat /etc/os-release
Purpose: Displays information about the distribution and version of the operating system.
Use Case: Useful when you need to verify system information, particularly in scripts or when providing tech support.
sudo apt-get install needrestart
Purpose: Installs the needrestart package.
Use Case: Important for system administrators to automatically detect services that need restarting after a library or package update.
sudo reboot
Purpose: Reboots the system.
Use Case: Required after certain updates, installations, or when changes in system configuration need to be applied.
sudo needrestart
Purpose: Runs needrestart, checking if any services need to be restarted after updates.
Use Case: Ensures that services are using the most recent libraries or binaries, maintaining system security and stability.
sudo ckan sysadmin add {name}
Purpose: Adds a system administrator to the CKAN data portal.
Use Case: Necessary for granting administrative access to new technical staff or for roles requiring high-level control over CKAN.
sudo ckan sysadmin list
Purpose: Lists all system administrators in CKAN.
Use Case: Useful for auditing and verifying who has administrative privileges on the CKAN platform.
sudo ckan user list
Purpose: Lists all users registered in CKAN.
Use Case: Helps in managing or reviewing the user base, which is crucial for user management and security audits.
sudo ckan --config /etc/ckan/default/ckan.ini config validate
Purpose: Validates the CKAN configuration file for errors.
Use Case: Ensures that any changes to the configuration file are correct and will not disrupt service, crucial in maintenance or configuration updates.
sudo nano /etc/ckan/default/ckan.ini
Purpose: Opens the CKAN configuration file in nano for editing.
Use Case: Useful for administrators to make changes to the configuration of CKAN, like adjusting settings or enabling features.
exit
Purpose: Exits the terminal session.
Use Case: Secures the terminal by closing the session when maintenance or tasks are completed, especially important in multi-user environments or when logged in as a privileged user.