Cheatography
https://cheatography.com
Containerslxc-ls | List all containers | lxc-attach -n <name> | Enter the named container | lxc-start | Start and attach | lxc-start -d | Start in background - no login | lxc-clone <source> <target> | Clone container | lxc-destroy | Remove container & contents | lxc-netstat | Run netstat for a container | lxc-ps | List processes | lxc-stop | Stop Container | lxc-freeze | lxc-freeze - freeze all the container's processes |
# Note: all commands take -n as parameter to specify the container
Systemctlsystemctl start | Start a service | systemctl stop | Stop a service | systemctl reload | Reload configuration for running service | systemctl restart | Restart service | systemctl reload-or-restart | Reload or Restart | systemctl status | Get service status | systemctl enable | Enables a service | systemctl disable | Disables a service | systemctl is-active | Check if service is active | systemctl is-enabled | Check is enabled at boot |
systemctl takes the service name as an arguement
| | Postgressudo -u postgres psql postgres | Run postgres as postgres user | \l | List Databases | \du | List roles | \c <databasename | Connect to database name | \dt | List tables in current database | \dt .. | List tables globally | \dn | List schemas | \d <tablename> | List columns of table |
Host Commandsinit 6 | Gracefully reboot | shutdown -r now "reason" | Gracefully reboot & log | iostat <refresh interval> | Disk utilization | ss -l | Currently listening sockets | sar 1 <interval> | Cpu stats | sar -b <interval> <repeat> | /O stats every x seconds x times |
Elasticcurl -XPOST 'localhost:9200/_flush/synced' 1 curl -XPOST 'localhost:9200/_flush/synced' | curl -XPOST 'http://localhost:9200/_cache/clear' | curl -XPUT localhost:9200/_cluster/settings -d '{ "transient" :{ "cluster.routing.allocation.node_concurrent_recoveries" : 6 } }';echo | |
|
Created By
Metadata
Favourited By
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets