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
SSH into your CloudBolt server with this command:
ssh root@<cloudbolt_ip>
Enter you CloudBolt ssh password. Out of the box it is
cloudbolt
Once you do that you are going to want to navigate to the home directory like this:
cd ~
From there you are going to want to edit the
.bashrc
file with this command:vi .bashrc
Then, you are going to want to press the
i
key to enter “Insert” mode to be able to type.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'
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.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 typesp
and hit enter!
0 Comments