Pages

FreeBSD Survival Guide, UTF-8 console




http://www.cs.put.poznan.pl/csobaniec/edu/zsr/freebsd-sg.html

Midnight Commander UTF-8 display settings

 ~/.config/mc/ini
[Misc]
display_codepage=UTF-8
source_codepage=Other_8_bit
autodetect_codeset=
clipboard_store=


This document refers to FreeBSD 10.1.

Installation

  1. Networking under VirtualBox: use Intel Pro/1000 MT Desktop (8254OEM) network card. The inferface is available under FreeBSD as em0.
  2. Allow remote login for root by editing /etc/ssh/sshd_config:
    PermitRootLogin yes
    
    and start SSH server:
    # service sshd start
    
    Use bsdconfig to configure it: Configure —> Networking —> sshd.
  3. Software selection: minimal + the following packages:
    bash
    

Packages/Ports

  1. To install a new package for the first time:
    • start bsdconfig
    • choose Configure —> Packages —> FTP and choose an FTP server
    • select packages and install
  2. Install pkg command by running:
    # pkg
    The package management tool is not yet installed on your system.
    Do you want to fetch and install it now? [y/N]: y
    
  3. Info about installed packages:
    # pkg info
    # pkg info pkg
    
  4. Update remote repository cache:
    # pkg update
    
  5. Upgrade packages:
    # pkg upgrade
    
  6. Remove unneeded packages:
    # pkg autoremove
    
  7. Installation of ports:
    # portsnap fetch
    # portsnap extract
    
  8. Updating ports:
    # portsnap update
    
  9. Search for ports:
    # cd /usr/ports
    # make search name=vim
    
  10. Install a port:
    # cd /usr/ports/editors/vim
    # make
    # make install
    # make clean
    
  11. Useful ports:
    editors/vim
    misc/mc
    sysutils/screen
    x11/xorg-minimal
    x11-wm/xfce4
    

Administration

System settings

  1. The main settings are stored in /etc/rc.conf file which consists of parameters listed in/etc/defaults/rc.conf. See rc.conf(5) for more details.
  2. The main administration tool is bsdconfig.
  3. To access the CD-ROM:
    # mount -t cd9660 /dev/cd0 /mnt
    
  4. Install bash and set it as a default shell for root.
  5. Networking: add to /etc/rc.conf:
    # ifconfig_em0="DHCP"
    
    to activate DHCP for em0 interface.

Console

  1. History is available after pressing ScrollLock.
  2. Video parameters: add to /etc/rc.conf the following line:
    allscreens_flags="-h 1000 -t off 80x30"
    
    See vidcontrol(1) for more details.
  3. Delete key may be activated by editing ~/.inputrc:
    "\C-?": delete-char
    
  4. Polish keybord/fonts: add to /etc/rc.conf:
    font8x8="iso02-8x8"
    font8x14="iso02-8x14"
    font8x16="iso02-8x16"
    keymap="pl_PL.ISO8859-2.kbd"
    
    Next, add to /etc/login.conf to the default section:
    default:\
            ...
            :charset=UTF-8:\
            :lang=en_US.UTF-8:
    
    Finally run:
    # cap_mkdb /etc/login.conf
    
  5. Mouse in text mode: add to /etc/rc.conf:
    moused_enable="YES"
    

Kernel modules

  1. List of modules:
    # kldstat
    
  2. Load a module:
    # kldload vboxdrv
    
  3. Automatic loading of modules: edit /boot/loader.conf:
    vboxdrv_load="YES"
    

Resources

[HBook]FreeBSD Handbook. Available at http://www.freebsd.org/doc/en/books/handbook/.
[Wiki]Wikipedia entry for FreeBSD: http://en.wikipedia.org/wiki/FreeBSD.
[PCBSD]PC-BSD — a derivate of FreeBSD. http://www.pcbsd.org/
[Why]Why FreeBSD — A quick tour of the BSD alternative.http://www.ibm.com/developerworks/opensource/library/os-freebsd/