• Complain

it-ebooks - FreeBSD 101 Hacks

Here you can read online it-ebooks - FreeBSD 101 Hacks full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2018, publisher: iBooker it-ebooks, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

it-ebooks FreeBSD 101 Hacks
  • Book:
    FreeBSD 101 Hacks
  • Author:
  • Publisher:
    iBooker it-ebooks
  • Genre:
  • Year:
    2018
  • Rating:
    3 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 60
    • 1
    • 2
    • 3
    • 4
    • 5

FreeBSD 101 Hacks: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "FreeBSD 101 Hacks" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

it-ebooks: author's other books


Who wrote FreeBSD 101 Hacks? Find out the surname, the name of the author of the book and a list of all author's works by series.

FreeBSD 101 Hacks — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "FreeBSD 101 Hacks" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Table of Contents
  1. Summary
  2. 1.1
  3. 1.2
  4. 1.3
  5. 1.4
  6. 1.5
  7. 1.6
  8. 1.7
  9. 1.8
  10. 1.9
  11. 1.10
  12. 1.11
  13. 1.12
  14. 1.13
  15. 1.14
  16. 1.15
  17. 1.16
  18. 1.17
  19. 1.18
  20. 1.19
  21. 1.20
  22. 1.21
  23. 1.22
  24. 1.23
  25. 1.24
  26. 1.25
  27. 1.26
  28. 1.27
  29. 1.28
  30. 1.29
  31. 1.30
  32. 1.31
  33. 1.32
  34. 1.33
  35. 1.34
  36. 1.35
  37. 1.36
  38. 1.37
Use "freecolor" to display memory and swap usage
Use "freecolor" to display memory and swap usage

Freecolor on FreeBSD is equal to free on GNU/Linux. Install it:

# cd /usr/ports/sysutils/freecolor# make install clean

Display the memory and swap usage in bar format:

# freecolorPhysical : [#################################..] 94% (1907820/2018396)Swap : [###################################] 100% (1048540/1048540)

Display usage in traditional "free" format:

# freecolor -m -o total used free shared buffers cachedMem: 1971 107 1863 0 0 0Swap: 1023 0 1023

Reference:
FreeBSD find out RAM size Including Total Amount of Free and Used Memory Size.

Accept default options during installing port
Accept default options during installing port

During building and installing port, if you are tired of the prompt, and want to use all default options, you can utilize BATCH:

# make install clean BATCH=yes

Reference:
How can I avoid the prompts when installing a FreeBSD port?.

Backup old kernel
Backup old kernel

Every time, when a new kernel is installed, the last installed kernel will be backed up in a directory who is called kernel.old. So it is important to remember to save a copy of usable kernel in case the newly-built kernel can't work. For example:

# mv /boot/kernel.old /boot/kernel.good # mv /boot/kernel /boot/kernel.bad# mv /boot/kernel.good /boot/kernel

During boot, you can press 5 to select which kernel to run:
References FreeBSD reverting to previous kernel If Something Goes Wrong - photo 1References FreeBSD reverting to previous kernel If Something Goes Wrong - photo 2
References:
FreeBSD: reverting to previous kernel;
If Something Goes Wrong.

Build kernel
Build kernel

If you want to build a custom kernel yourself, you need to install the source code firstly (you can take as a reference). Then enter the configuration directory of your machine:

# cd /usr/src/sys/`uname -m`/conf

Copy a new kernel configuration file:

# cp GENERIC NAN_FIRST_BUILD

You can modify the new configuration file (NAN_FIRST_BUILD) according to your needs.

Build the kernel:

# cd /usr/src# make buildkernel KERNCONF="NAN_FIRST_BUILD"

Once it is finished, install the fresh kernel binary and reboot:

# make installkernel KERNCONF="NAN_FIRST_BUILD"# reboot

Check the kernel version, you will find now the OS is harnessing your newly built kernel now:

# uname -aFreeBSD FreeBSD 10.3-RELEASE-p5 FreeBSD 10.3-RELEASE-p5 #0: Tue Jul 19 17:52:57 CST 2016 root@FreeBSD:/usr/obj/usr/src/sys/NAN_FIRST_BUILD amd64

Reference:
How to build a custom kernel in FreeBSD.

Change PATH environment variable
Change PATH environment variable

In csh, if you want to change $PATH environment variable, you should modify .cshrc file:

# cat .cshrc......set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin $HOME/gocode/bin)......

For example, you add "/usr/local/go/bin" into $PATH:

# cat .cshrc......set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin $HOME/gocode/bin /usr/local/go/bin)......

Then executing "source .cshrc" command, you will find the new $PATH takes effect:

# source .cshrc# echo $PATH/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin:/root/gocode/bin:/usr/local/go/bin

Reference:
Misc Tips & Tricks.

Change the shell
Change the shell

If you were previously working on Linux, you may miss Bash, and not accustomed to csh which is shipped on FreeBSD by default. You can change the shell to Bash following the below instructions:

(1) The Bash must already be installed on your FreeBSD, and its full path should also be included in /etc/shells. E.g:

# pkg install bashUpdating FreeBSD repository catalogue...FreeBSD repository is up-to-date.All repositories are up-to-date.The following 1 package(s) will be affected (of 0 checked):New packages to be INSTALLED: bash: 4.3.42_1......

Then you will find the Bash path is presented in /etc/shells automatically:

# cat /etc/shells# $FreeBSD: releng/10.3/etc/shells 59717 2000-04-27 21:58:46Z ache $## List of acceptable shells for chpass(1).# Ftpd will not allow users to connect who are not using# one of these shells./bin/sh/bin/csh/bin/tcsh/usr/local/bin/bash/usr/local/bin/rbash

(2) Execute chsh -s /usr/local/bin/bash:

# chsh -s /usr/local/bin/bashchsh: user information updated

After you login again, you can find the shell is bash now:

# echo $SHELL/usr/local/bin/bash

Reference:
Shells.

Clear Directory Structure
Clear directory structure

FreeBSD has a clear separation between base operating system and user-added applications, that means everything which does not belong to the base operating system is under /usr/local directory, and the /usr/local directory contains a directory structure that mostly mirrors the structure found in the / or /usr directory.

For example, the application installed from port tree or package command will be located in /usr/local/bin or /usr/local/sbin, corresponding to /bin, /sbin, /usr/bin and /usr/local/sbin; and /etc directory contains configuration files for the base operating system while /usr/local/etc for user-added applications.

References:
A Comparative Introduction to FreeBSD for Linux Users;
Directory Structure;
Ten Things I like About FreeBSD.

Colorize bash
Colorize bash

(1) In your $HOME directory, create ..dir_colors file:

# Below, there should be one TERM entry for each termtype that is colorizableTERM ansiTERM color-xtermTERM con132x25TERM con132x30TERM con132x43TERM con132x60TERM con80x25TERM con80x28TERM con80x30TERM con80x43TERM con80x50TERM con80x60TERM cons25TERM consoleTERM cygwinTERM dttermTERM EtermTERM gnomeTERM konsoleTERM ktermTERM linuxTERM linux-cTERM mach-colorTERM puttyTERM rxvtTERM rxvt-cygwinTERM rxvt-cygwin-nativeTERM rxvt-unicodeTERM screenTERM screen-bceTERM screen-wTERM screen.linuxTERM vt100TERM xtermTERM xterm-256colorTERM xterm-colorTERM xterm-debian# Below are the color init strings for the basic file types. A color init# string consists of one or more of the following numeric codes:# Attribute codes:# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed# Text color codes:# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white# Background color codes:# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=whiteNORMAL 00 # global default, although everything should be something.FILE 00 # normal fileDIR 01;34 # directoryLINK 01;36 # symbolic link. (If you set this to 'target' instead of a # numerical value, the color will match the file pointed to)FIFO 40;33 # pipeSOCK 01;35 # socketDOOR 01;35 # doorBLK 40;33;01 # block device driverCHR 40;33;01 # character device driverORPHAN 01;05;37;41 # orphaned syminksMISSING 01;05;37;41 # ... and the files they point to# This is for files with execute permission:EXEC 01;32# List any file extensions like '.gz' or '.tar' that you would like ls# to colorize below. Put the extension, a space, and the color init string.# (and any comments you want to add after a '#').cmd 01;32 # executables (bright green).exe 01;32.com 01;32.btm 01;32.bat 01;32.sh 01;32.csh 01;32.tar 01;31 # archives / compressed (bright red).tgz 01;31.arj 01;31.taz 01;31.lzh 01;31.zip 01;31.z 01;31.Z 01;31.gz 01;31.bz2 01;31.bz 01;31.tbz2 01;31.tz 01;31.deb 01;31.rpm 01;31.rar 01;31 # app-arch/rar.ace 01;31 # app-arch/unace.zoo 01;31 # app-arch/zoo.cpio 01;31 # app-arch/cpio.7z 01;31 # app-arch/p7zip.rz 01;31 # app-arch/rzip.jpg 01;35 # image formats.jpeg 01;35.gif 01;35.bmp 01;35.ppm 01;35.tga 01;35.xbm 01;35.xpm 01;35.tif 01;35.tiff 01;35.png 01;35.mng 01;35.xcf 01;35.pcx 01;35.mpg 01;35.mpeg 01;35.m2v 01;35 # MPEG-2 Video only.avi 01;35.mkv 01;35 # Matroska (http://matroska.org/).ogm 01;35 # Ogg Media File.mp4 01;35 # "Offical" container for MPEG-4.m4v 01;35 # MPEG-4 Video only.mp4v 01;35 # MPEG-4 Video only.mov 01;35 # Quicktime (http://developer.apple.com/qa/qtw/qtw99.html).qt 01;35 # Quicktime (http://developer.apple.com/qa/qtw/qtw99.html).wmv 01;35 # Windows Media Video.asf 01;35 # Advanced Systems Format (contains Windows Media Video).rm 01;35 # Real Media.rmvb 01;35 # Real Media Variable Bitrate.flc 01;35 # AutoDesk Animator.fli 01;35 # AutoDesk Animator.gl 01;35.dl 01;35.pdf 00;32 # Document files.ps 00;32.txt 00;32.patch 00;32.diff 00;32.log 00;32.tex 00;32.doc 00;32.mp3 00;36 # Audio files.wav 00;36.mid 00;36.midi 00;36.au 00;36.ogg 00;36.flac 00;36.aac 00;36
Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «FreeBSD 101 Hacks»

Look at similar books to FreeBSD 101 Hacks. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «FreeBSD 101 Hacks»

Discussion, reviews of the book FreeBSD 101 Hacks and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.