- AIX uses RPM and
yum. - default shell is
ksh. - Before you start, run
df -mto make sure you have enough disk space to do development. Ask for someone who knows IBM's cloud UI to fix it, lest you be forced to wrangle with AIX's volume manager. vim,gitandgolangavailable via yum.- Dev Toolbox: https://www.ibm.com/support/pages/node/883796. Installing this might help a few things. There's a
yum.shscript at the top of the page. - Once you install the Dev Toolbox, yum will have an
AIX_toolboxrepo that contains standard GNU coreutils. The ones you get are not standard. For example,ls --color=autodoesn't work out of the box. - Run
yum install coreutilsonce you have theAIX_toolboxrepo. Addexport PATH=/usr/linux/bin:opt/freeware/bin:$PATHto your.bashrcto get standard gnu coreutils.
useraddwill create a new usermkdir /home/USERandchmod USER:system /home/USERto create your directory- If you've installed bash 5, it's not available in the default shells available to
chsh. You'll need to add/usr/bin/bashto/etc/security/login.cfg. After that, you can runchsh USER /usr/bin/bash - If you're a
zshuser and you'd like to help me figure out why zsh dumps core all the time, go ahead. - At the bottom of this readme I've made a nice
~/.bashrcfile since you don't get anything - You might need to manually run
source .bashrcfor reasons I'm not too clear on. - If you need to install OpenSSL for something, you'll need to follow the process here: https://www.ibm.com/support/pages/node/720655
- Linux commands that commonly take
-hargs take-gand-minstead. I.e,du -mto list directory usage in MBs. - Use
spaceinstead ofdown arrowto scroll on man pages. Or just doman whatever | lessto make it normal. - Not really an AIX thing, but https://github.com/amix/vimrc might be helpful, since most of our fancy IDEs probably don't work here.
- Ususal hardware info utilities aren't there. For CPU info:
prtconf -s && lsdev -Cc processor && bindprocessor -qFor memory info:prtconf -m. For memory usage:vmstat. For disk usage:df -m.
- I'm sorry
lspv will list the physical volumes. Physical volumes usually take the form hdisk*. A physical disk can't be manipluated or "touched" in a meaninful way until it's added to a volume group. If you're trying to add a new PV to the existing volume group, run extendvg rootvg hdisk1. If you run into partition count errors, try chvg -t 16 rootvg. lsvg rootvg will tell you the status of your volume group and free space.
If your volume group has sufficient space, you can extend the size of a logical voume using extendlv. To get a list of LVs, run df. The LV names are just the device mount point, ie /dev/hd4 uses the LV hd4. For example, to expand /opt/ by 10GB, run extendlv hd10opt 10G. To expand the filesystem backed by the LV, run chfs. For example: chfs -a size=+10G /opt.
export PATH=/usr/linux/bin:/opt/freeware/bin:$PATH
alias ls='ls --color=auto'
# get current branch in git repo
function parse_git_branch() {
BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
if [ ! "${BRANCH}" == "" ]
then
STAT=`parse_git_dirty`
echo "[${BRANCH}${STAT}]"
else
echo ""
fi
}
# get current status of git repo
function parse_git_dirty {
status=`git status 2>&1 | tee`
dirty=`echo -n "${status}" 2> /dev/null | grep "modified:" &> /dev/null; echo "$?"`
untracked=`echo -n "${status}" 2> /dev/null | grep "Untracked files" &> /dev/null; echo "$?"`
ahead=`echo -n "${status}" 2> /dev/null | grep "Your branch is ahead of" &> /dev/null; echo "$?"`
newfile=`echo -n "${status}" 2> /dev/null | grep "new file:" &> /dev/null; echo "$?"`
renamed=`echo -n "${status}" 2> /dev/null | grep "renamed:" &> /dev/null; echo "$?"`
deleted=`echo -n "${status}" 2> /dev/null | grep "deleted:" &> /dev/null; echo "$?"`
bits=''
if [ "${renamed}" == "0" ]; then
bits=">${bits}"
fi
if [ "${ahead}" == "0" ]; then
bits="*${bits}"
fi
if [ "${newfile}" == "0" ]; then
bits="+${bits}"
fi
if [ "${untracked}" == "0" ]; then
bits="?${bits}"
fi
if [ "${deleted}" == "0" ]; then
bits="x${bits}"
fi
if [ "${dirty}" == "0" ]; then
bits="!${bits}"
fi
if [ ! "${bits}" == "" ]; then
echo " ${bits}"
else
echo ""
fi
}
export PS1="\u@\w:\`parse_git_branch\` "