How-to add a command to open shell_plus

Overview

When I provision a new CloudBolt server, I find myself needing to launch shell_plus. I find it slow to have to type out “/opt/cloudbolt/manage.py shell_plus” every time I want to launch shell_plus. This article will go over some simple steps to achieve this with just one command.

Solution

  1. SSH into your CloudBolt server with this command: ssh root@<cloudbolt_ip>

  2. Enter you CloudBolt ssh password. Out of the box it is cloudbolt

  3. Once you do that you are going to want to navigate to the home directory like this: cd ~

  4. From there you are going to want to edit the .bashrc file with this command: vi .bashrc

  5. Then, you are going to want to press the i key to enter “Insert” mode to be able to type.

  6. You should see a couple different lines with the word alias in it. After those lines you are going to want to add the line that looks like this: alias sp='/opt/cloudbolt/manage.py shell_plus'

  7. Once that is done, you can hit the esc button to exit “Insert” mode, and then enter this: :wq and hit enter to exit the vi editor.

  8. After all those steps are done you can enter this command: source .bashrc to apply the changes, and then all you need to do to open shell_plus from now on is type sp and hit enter!

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.