One of the most popular features of AIX is the Systems Management Interface Tool, better known as SMIT. SMIT is an interactive menu-based system which can be used for almost all systems management tasks. That makes SMIT an indispensable tool for AIX sys admins.
If you happen to be logged in using a Graphical X Windows client and run the command smit, you'll get the GUI version. You can always get the text-based version by running smitty.
Although many people use SMIT every day, they're not always aware of the keyboard shortcuts which can really save keystrokes and time. Here are a few of the most helpful ones.
Quick Escape
From within SMIT you can escape to the shell using F9 (you may need to press Esc followed quickly by 9 which is shown here as Esc + 9). This shell escape is handy if you want to check something on the OS before continuing in SMIT. By using the quick shell escape you don't have to open a new session or exit SMIT altogether and then navigate back through all the SMIT menus. To return from the shell to where you were in SMIT, type in exit.
If you want to get out of SMIT altogether, you don't need to press F3 (or Esc + 3) back through the menu hierarchy. You can just use F10 (or Esc + 0) and you'll be back at the shell prompt.
When you're in a screen with a lot of output, you can navigate quickly to the bottom of the command output by using End or Esc + > (that's the Esc key followed quickly by the > key). To get to the top of the output, use Home or Esc + <
Use the cursor keys (up and down arrow keys) to step up and down menu items. If you want to go down a page at a time, you can press Ctrl + v. Page up is Esc + v.
Quick Deletion
If you're in a dialog screen and you want to delete from the cursor to the end of the line, you can do it with Ctrl + k. To delete just the next character use Ctrl + x.
SMIT fastpath
For a quick entry into a menu you can use the SMIT fastpath, such as smit lv to get to the Logical Volumes menu. To find out the fastpath for the menu you're on, press F8.
Under the Hood
You can have a look under the hood and see the commands that SMIT performs before or after it runs them by pressing F6 (or Esc + 6). This is one of the strengths of SMIT: It combines a user-friendly menu system with the ability to see the commands behind the menus. That makes SMIT a great way to learn new commands and to get some ideas for your own shell scripting.
The tables below give a list of SMIT keyboard shortcuts.
|
Cursor movement
|
Keyboard shortcut
|
|
Scroll to the next page
|
PageDown or Ctrl-V
|
|
Scroll to the previous page
|
PageUp or Esc-V
|
|
Scroll to bottom of command output
|
End (Esc > )
|
|
Scroll to top of command output
|
Home or Esc <
|
|
Selecting and editing
|
Keyboard shortcut
|
|
List valid choices
|
F4 (Esc + 4)
|
|
Toggle between choices (e.g. true / false)
|
Tab key
|
|
Reset the entry field to original setting
|
F5 (Esc + 5)
|
|
Delete next character
|
Ctrl + x
|
|
Delete to end of line
|
Ctrl + k
|
|
Select entries on multi-select lists
|
F7 (Esc + 7)
|
|
View and edit a long field
|
F7 (Esc+7)
|
|
Menu navigation and miscellaneous
|
Keyboard shortcut
|
|
Back up one level to previous screen
|
F3 (Esc + 3)
|
|
Escape to shell
|
F9 (Esc + 9)
|
|
Exit from SMIT
|
F10 (Esc + 0)
|
|
Display SMIT FastPath
|
F8 (Esc + 8)
|
|
Refresh screen
|
F2 (Esc + 2)
|
|
Show command string
|
F6 (Esc + 6)
|
If you want to learn more about SMIT, including how to use it to as a basis for your scripts, see the resources below.
Resources
Anthony English is an AIX / Power Systems engineer working in Sydney. Follow him on Twitter @AIXDownUnder.