November 3, 2016

Change your Unix login shell

If you don’t like the default shell on your system you can easily change it with the chsh command e.g. chsh -s /opt/local/bin/bash You will be asked to enter your password to make the change.

May 30, 2016

Unix - finding programs

You can use whereis to search standard binary, manual page and source directories for the specified programs. This can be particularly handy when you are trying to find where in the ports tree an application is. Try whereis firefox and whereis whereis.

May 30, 2016

Unix - Aliases

You can use aliases to decrease the amount of typing you need to do to get commands you commonly use. Examples of fairly popular aliases include (in Bourne shell style, as in /bin/sh, bash, ksh, and zsh): alias lf="ls -FA" alias ll="ls -lA" alias su="su -m" In csh or tcsh, these would be alias lf ls -FA alias ll ls -lA alias su su -m To remove an alias, you can usually use unalias aliasname. Read more

May 30, 2016

Unix - less or more

Need to do a search in a man page or in a file you’ve sent to a pager (like less or more)? Use “/search_word”. To repeat the same search, type “n” for next.

May 30, 2016

FreeBSD - man pages

FreeBSD and other Unix systems use man pages for system documentation, they are called by the man command. For FreeBSD the following are useful man pages: man firewall will give advice for building a FreeBSD firewall man hier will explain the way FreeBSD filesystems are normally laid out. Man pages are divided into section depending on topic. There are 9 different sections numbered from 1 (General Commands) to 9 (Kernel Developer’s Manual). Read more

May 8, 2016

FreeBSD - Master Boot Record

If other operating systems have damaged your Master Boot Record, you can reinstall it with boot0cfg(8). See man boot0cfg for details.

May 8, 2016

FreeBSD - fetch

Having trouble using fetch through a firewall? Try setting the environment variable FTP_PASSIVE_MODE to yes, and see fetch(3) for more details.

May 8, 2016

Bash Prompt

You can adjust your bash prompt to virtually anything you like. Handy bash(1) prompt: PS1="\u@\h \w \!$" You can find more here: Bash Prompts

May 8, 2016

FreeBSD - Startup

FreeBSD is started up by the program ‘init’. The first thing init does when starting multiuser mode (ie, starting the computer up for normal use) is to run the shell script /etc/rc. By reading /etc/rc and the /etc/rc.d/ scripts, you can learn a lot about how the system is put together, which again will make you more confident about what happens when you do something with it.

© Arnold Greyling 2023