Tag: command line

  • How to kill a KVM virtual machine in Promox via the command line or terminal

      Sometimes a Proxmox KVM VM will stop responding to the GUI’s attempts to shut it down; fortunately it’s easy to shut it down from the command line. Make note of the VM ID (next to the name of the VM in the left pane of the Proxmox GUI), log into the server via SSH…

  • How to kill a process after a set period of time

    How to kill a process after a set period of time

      Knowing how to limit how long a process will run for is quite useful, particularly when you have daily backup scripts and the like which may at times run more than 24 hours; having multiple processes attempting to synchronize the same files can waste time, bandwidth and CPU power needlessly. The command we will…

  • How to easily find the full path of a command in Ubuntu

    How to easily find the full path of a command in Ubuntu

      If you’re writing scripts or making cron jobs you will need to know the full path of the commands you’re using; rather than just being able to use “ls” you would have to use “/bin/ls” instead. You could use the find command here but there’s a quicker and more elegant way: which. Use it…

  • ESXi: Entering and exiting maintenance mode via command line

      Following on from yesterday’s post, here is how to enter or leave maintenance mode on an ESXi host via SSH:   vim-cmd hostsvc/maintenance_mode_enter   to go into maintenance mode – and to leave it:   vim-cmd hostsvc/maintenance_mode_exit   If you’re interested in other useful commands, you can see more hostsvc options by running:  …

  • How to find which version of ESXi you’re running from the command line?

      If you’re remotely logging in to a server to apply the latest patch but can’t remember whether you’re running 4, 4.1, 5.0 or 5.1 – and it can certainly happen when you’re managing quite a few of them remotely – there is a handy command to see which version and build number you’re actually…

  • How to exclude results from grep

      Sometimes you may wish to further filter grep output, such as in the following situation:   # zfs get all | grep compressratio backup01         compressratio         1.23x                  – backup01         refcompressratio      1.00x                  – backup01/data    compressratio         1.50x                  – backup01/data    refcompressratio      1.50x                  – backup01/photos  compressratio         1.05x                  – backup01/photos  refcompressratio      1.05x                  – Here we only really want to see…