· Oct 10, 2019 2m read

A simple trick I wish someone had told me 10 years ago

Are you all ready for something you wish you knew ages ago (or, in my case, a DECADE ago)?  Open up a portal in your favorite instance and go to:

System Administration->Configuration->Additional Settings->Startup

Scroll down to "Terminal Prompt" and click 'Edit'.  This allows you to edit what you see on your terminal prompt.  You can change that to my current setting: 8,3,2

What does this do?  It adds your instance name for your prompt.  So now your prompt can look like:


Congratulations, you will now NEVER be in the wrong instance again (remember the last time you were trying to fix a bug and you couldn't get things to work and you wasted the better part of an hour only to realize you were in the wrong Terminal the entire time?).  There are other useful bits there - but you can read about it in the page.  There is (obviously) a cpf parameter for this, under the [Startup] tag: TerminalPrompt=8,3,2.

Your portal options are more limited, but you can have a header on the page depending on the type of system.  Go to:

System Administration->Configuration->System Configuration->Memory and Startup

and change the "System Mode" to be the appropriate value.  How sweet is that!?

Thanks to @Mark Hanson for showing me this setting, and to @Jenny Ames  for encouraging me to post this on the DC.

Edit: Many in the comments have said they're using 1,3,2 (Host,Instance,Namspace) with the 8 (transaction level) thrown in somewhere.  I think this makes a lot of sense.  Obviously you should use the combo that works best for you, but I wanted to outline one that gives all the information you might need to identify an instance.


Edit 2: OH NO!  @John Murray pointed this out YEARS ago and I missed it!  Sorry, John!!!


Discussion (12)5
Log in or sign up to continue

Hey Kyle, 

You're a font of useful knowledge, another great nugget of info. I just wish there was a way to default the terminal colours so that I could see instantly which server I'm on, or even if its just production, testing or dev. 

I use a chrome plugin called URLColors that puts a colour wash over the page for my Management Portals so that I can see really clearly which server I'm operating on. If it has a red hue then I need to be careful, if it's green then I'm fine to play! 

Cheers for another great time and especially for sharing it, (although I've gone for 1,8,2 ;] )

If you ever have this problem in the browser then I've made a broswer extension that changes the colour of the headers of your different instances

It can also organise tabs into tab groups with the same colours for your instances and different tag names for namespaces

(if you like it feel free to vote for it in the Intersystems Grand Prix competition)