Aller au contenu

Bash Shell

Ce contenu n’est pas encore disponible dans votre langue.

A shell runs programs and provides a scripting language. The Code for IBM i extension connects to the IBM i using the Secure Shell (SSH) protocol.

There are a number of shells available, but the bash shell is more capable than the default shell program on IBM i.

You must change your default shell to bash. If you do not, parts of Code for IBM i will not work correctly.

Is the Bash Shell Installed?

The easiest way is to enter which bash in an SSH terminal session.

This should return /QOpenSys/pkgs/bin/bash. If it doesn’t then you need to talk to you system admin about getting IBM i Open Source Tools installed.

Setting Bash as the Default Shell

When you connect to a server, Code for IBM i checks that bash is your default shell. If bash is not the default shell, it will offer to set bash as the default.

bash set offer

This is the most convenient way to set bash as your default shell. You can ignore this prompt, but be aware that not all capabalities may work.

You can get information on setting bash as your default shell from IBM here.

Adding Bash to your PATH

You must have /QOpenSys/pkgs/bin/bash in your PATH. IBM provides documentation on how to do this using a .profile or .bashrc file in your home directory.

Note that if you use a .bashrc file it must not contain any echo or liblist statements.

Disconnect to Take Effect

After setting bash as your default shell, disconneect from the server so the change take effect.