head	1.56;
access;
symbols
	RELENG_8_4:1.56.0.2
	RELENG_9_1_0_RELEASE:1.49.2.2.2.2
	RELENG_9_1:1.49.2.2.0.2
	RELENG_9_1_BP:1.49.2.2
	RELENG_8_3_0_RELEASE:1.47.2.3.2.1
	RELENG_8_3:1.47.2.3.0.2
	RELENG_8_3_BP:1.47.2.3
	RELENG_9_0_0_RELEASE:1.49.2.1.2.1
	RELENG_9_0:1.49.2.1.0.2
	RELENG_9_0_BP:1.49.2.1
	RELENG_9:1.49.0.2
	RELENG_9_BP:1.49
	RELENG_7_4_0_RELEASE:1.42.2.3.2.1
	RELENG_8_2_0_RELEASE:1.47.2.2.4.1
	RELENG_7_4:1.42.2.3.0.2
	RELENG_7_4_BP:1.42.2.3
	RELENG_8_2:1.47.2.2.0.4
	RELENG_8_2_BP:1.47.2.2
	RELENG_8_1_0_RELEASE:1.47.2.2.2.1
	RELENG_8_1:1.47.2.2.0.2
	RELENG_8_1_BP:1.47.2.2
	RELENG_7_3_0_RELEASE:1.42.2.2.2.1
	RELENG_7_3:1.42.2.2.0.2
	RELENG_7_3_BP:1.42.2.2
	RELENG_8_0_0_RELEASE:1.47.2.1.2.1
	RELENG_8_0:1.47.2.1.0.2
	RELENG_8_0_BP:1.47.2.1
	RELENG_8:1.47.0.2
	RELENG_8_BP:1.47
	RELENG_7_2_0_RELEASE:1.42.2.1.6.1
	RELENG_7_2:1.42.2.1.0.6
	RELENG_7_2_BP:1.42.2.1
	RELENG_7_1_0_RELEASE:1.42.2.1.4.1
	RELENG_6_4_0_RELEASE:1.39.2.3.2.1
	RELENG_7_1:1.42.2.1.0.4
	RELENG_7_1_BP:1.42.2.1
	RELENG_6_4:1.39.2.3.0.2
	RELENG_6_4_BP:1.39.2.3
	RELENG_7_0_0_RELEASE:1.42.2.1
	RELENG_6_3_0_RELEASE:1.39.2.2.2.1
	RELENG_7_0:1.42.2.1.0.2
	RELENG_7_0_BP:1.42.2.1
	RELENG_6_3:1.39.2.2.0.2
	RELENG_6_3_BP:1.39.2.2
	RELENG_7:1.42.0.2
	RELENG_7_BP:1.42
	RELENG_6_2_0_RELEASE:1.39
	RELENG_6_2:1.39.0.8
	RELENG_6_2_BP:1.39
	RELENG_5_5_0_RELEASE:1.33.2.2
	RELENG_5_5:1.33.2.2.0.4
	RELENG_5_5_BP:1.33.2.2
	RELENG_6_1_0_RELEASE:1.39
	RELENG_6_1:1.39.0.6
	RELENG_6_1_BP:1.39
	RELENG_6_0_0_RELEASE:1.39
	RELENG_6_0:1.39.0.4
	RELENG_6_0_BP:1.39
	RELENG_6:1.39.0.2
	RELENG_6_BP:1.39
	RELENG_5_4_0_RELEASE:1.33.2.2
	RELENG_5_4:1.33.2.2.0.2
	RELENG_5_4_BP:1.33.2.2
	RELENG_4_11_0_RELEASE:1.14.2.13
	RELENG_4_11:1.14.2.13.0.4
	RELENG_4_11_BP:1.14.2.13
	RELENG_5_3_0_RELEASE:1.33
	RELENG_5_3:1.33.0.4
	RELENG_5_3_BP:1.33
	RELENG_5:1.33.0.2
	RELENG_5_BP:1.33
	RELENG_4_10_0_RELEASE:1.14.2.13
	RELENG_4_10:1.14.2.13.0.2
	RELENG_4_10_BP:1.14.2.13
	RELENG_5_2_1_RELEASE:1.31
	RELENG_5_2_0_RELEASE:1.31
	RELENG_5_2:1.31.0.2
	RELENG_5_2_BP:1.31
	RELENG_4_9_0_RELEASE:1.14.2.12
	RELENG_4_9:1.14.2.12.0.2
	RELENG_4_9_BP:1.14.2.12
	RELENG_5_1_0_RELEASE:1.30
	RELENG_5_1:1.30.0.2
	RELENG_5_1_BP:1.30
	RELENG_4_8_0_RELEASE:1.14.2.11
	RELENG_4_8:1.14.2.11.0.2
	RELENG_4_8_BP:1.14.2.11
	RELENG_5_0_0_RELEASE:1.29
	RELENG_5_0:1.29.0.2
	RELENG_5_0_BP:1.29
	RELENG_4_7_0_RELEASE:1.14.2.6
	RELENG_4_7:1.14.2.6.0.2
	RELENG_4_7_BP:1.14.2.6
	RELENG_4_6_2_RELEASE:1.14.2.4
	RELENG_4_6_1_RELEASE:1.14.2.4
	RELENG_4_6_0_RELEASE:1.14.2.4
	RELENG_4_6:1.14.2.4.0.2
	RELENG_4_6_BP:1.14.2.4
	RELENG_4_5_0_RELEASE:1.14.2.2
	RELENG_4_5:1.14.2.2.0.4
	RELENG_4_5_BP:1.14.2.2
	RELENG_4_4_0_RELEASE:1.14.2.2
	RELENG_4_4:1.14.2.2.0.2
	RELENG_4_4_BP:1.14.2.2
	RELENG_4:1.14.0.2;
locks; strict;
comment	@# @;


1.56
date	2013.03.22.05.07.40;	author svnexp;	state Exp;
branches
	1.56.2.1;
next	1.55;

1.55
date	2012.11.17.01.49.06;	author svnexp;	state Exp;
branches;
next	1.54;

1.54
date	2012.10.23.15.03.25;	author eadler;	state Exp;
branches;
next	1.53;

1.53
date	2012.10.22.03.00.43;	author eadler;	state Exp;
branches;
next	1.52;

1.52
date	2012.10.02.00.30.15;	author eadler;	state Exp;
branches;
next	1.51;

1.51
date	2012.05.10.12.46.12;	author eadler;	state Exp;
branches;
next	1.50;

1.50
date	2012.05.09.22.13.56;	author eadler;	state Exp;
branches;
next	1.49;

1.49
date	2010.08.09.09.26.17;	author fjoe;	state Exp;
branches
	1.49.2.1;
next	1.48;

1.48
date	2010.01.11.21.17.49;	author gavin;	state Exp;
branches;
next	1.47;

1.47
date	2009.01.12.19.17.43;	author simon;	state Exp;
branches
	1.47.2.1;
next	1.46;

1.46
date	2008.05.31.18.07.16;	author remko;	state Exp;
branches;
next	1.45;

1.45
date	2007.12.08.00.20.33;	author dougb;	state Exp;
branches;
next	1.44;

1.44
date	2007.12.07.22.41.39;	author dougb;	state Exp;
branches;
next	1.43;

1.43
date	2007.12.07.22.28.07;	author dougb;	state Exp;
branches;
next	1.42;

1.42
date	2006.12.03.15.22.45;	author maxim;	state Exp;
branches
	1.42.2.1;
next	1.41;

1.41
date	2006.10.09.04.11.34;	author chinsan;	state Exp;
branches;
next	1.40;

1.40
date	2005.08.06.18.13.30;	author krion;	state Exp;
branches;
next	1.39;

1.39
date	2005.03.19.02.44.41;	author murray;	state Exp;
branches
	1.39.2.1;
next	1.38;

1.38
date	2005.02.28.17.05.00;	author yar;	state Exp;
branches;
next	1.37;

1.37
date	2005.01.18.11.52.19;	author phk;	state Exp;
branches;
next	1.36;

1.36
date	2005.01.17.10.06.12;	author phk;	state Exp;
branches;
next	1.35;

1.35
date	2005.01.03.14.17.23;	author josef;	state Exp;
branches;
next	1.34;

1.34
date	2004.08.24.11.30.28;	author blackend;	state Exp;
branches;
next	1.33;

1.33
date	2004.02.18.05.18.27;	author cperciva;	state Exp;
branches
	1.33.2.1;
next	1.32;

1.32
date	2004.01.07.19.49.12;	author blackend;	state Exp;
branches;
next	1.31;

1.31
date	2003.08.02.20.36.28;	author schweikh;	state Exp;
branches;
next	1.30;

1.30
date	2003.02.15.09.11.25;	author robert;	state Exp;
branches;
next	1.29;

1.29
date	2002.11.16.13.24.44;	author joerg;	state Exp;
branches;
next	1.28;

1.28
date	2002.10.20.13.41.44;	author tom;	state Exp;
branches;
next	1.27;

1.27
date	2002.10.19.21.34.50;	author blackend;	state Exp;
branches;
next	1.26;

1.26
date	2002.09.04.23.28.35;	author jmallett;	state Exp;
branches;
next	1.25;

1.25
date	2002.07.14.22.50.12;	author dwmalone;	state Exp;
branches;
next	1.24;

1.24
date	2002.07.07.16.13.48;	author mp;	state Exp;
branches;
next	1.23;

1.23
date	2002.04.28.21.59.07;	author dougb;	state Exp;
branches;
next	1.22;

1.22
date	2002.04.01.08.53.21;	author joe;	state Exp;
branches;
next	1.21;

1.21
date	2002.04.01.08.43.58;	author joe;	state Exp;
branches;
next	1.20;

1.20
date	2002.02.11.03.45.29;	author keramida;	state Exp;
branches;
next	1.19;

1.19
date	2001.12.17.08.16.14;	author mikeh;	state Exp;
branches;
next	1.18;

1.18
date	2001.11.19.20.17.19;	author keramida;	state Exp;
branches;
next	1.17;

1.17
date	2001.09.27.00.43.28;	author murray;	state Exp;
branches;
next	1.16;

1.16
date	2001.08.30.22.44.50;	author alex;	state Exp;
branches;
next	1.15;

1.15
date	2001.08.12.20.32.37;	author mharo;	state Exp;
branches;
next	1.14;

1.14
date	2001.06.30.14.42.20;	author mpp;	state Exp;
branches
	1.14.2.1;
next	1.13;

1.13
date	2001.06.26.02.36.26;	author dd;	state Exp;
branches;
next	1.12;

1.12
date	2001.06.25.21.05.55;	author brian;	state Exp;
branches;
next	1.11;

1.11
date	2001.06.25.20.45.52;	author brian;	state Exp;
branches;
next	1.10;

1.10
date	2001.06.25.20.44.03;	author brian;	state Exp;
branches;
next	1.9;

1.9
date	2001.06.25.20.41.42;	author brian;	state Exp;
branches;
next	1.8;

1.8
date	2001.06.20.20.14.36;	author mph;	state Exp;
branches;
next	1.7;

1.7
date	2001.06.19.16.46.58;	author nik;	state Exp;
branches;
next	1.6;

1.6
date	2001.06.19.05.46.30;	author dd;	state Exp;
branches;
next	1.5;

1.5
date	2001.06.16.16.45.52;	author nik;	state Exp;
branches;
next	1.4;

1.4
date	2001.06.16.11.42.28;	author nik;	state Exp;
branches;
next	1.3;

1.3
date	2001.06.15.18.23.44;	author eivind;	state Exp;
branches;
next	1.2;

1.2
date	2001.06.15.10.47.30;	author nik;	state Exp;
branches;
next	1.1;

1.1
date	2001.06.15.08.45.43;	author nik;	state Exp;
branches;
next	;

1.56.2.1
date	2013.03.22.05.07.40;	author svnexp;	state dead;
branches;
next	1.56.2.2;

1.56.2.2
date	2013.03.28.13.02.45;	author svnexp;	state Exp;
branches;
next	;

1.49.2.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.49.2.1.2.1;
next	1.49.2.2;

1.49.2.2
date	2012.05.13.01.29.49;	author eadler;	state Exp;
branches
	1.49.2.2.2.1;
next	1.49.2.3;

1.49.2.3
date	2012.10.05.22.42.57;	author eadler;	state Exp;
branches;
next	1.49.2.4;

1.49.2.4
date	2012.10.26.00.34.27;	author eadler;	state Exp;
branches;
next	1.49.2.5;

1.49.2.5
date	2012.11.17.11.36.12;	author svnexp;	state Exp;
branches;
next	1.49.2.6;

1.49.2.6
date	2013.04.24.05.02.10;	author svnexp;	state Exp;
branches;
next	;

1.49.2.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.49.2.1.2.2;

1.49.2.1.2.2
date	2012.11.17.08.36.12;	author svnexp;	state Exp;
branches;
next	;

1.49.2.2.2.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.49.2.2.2.2;

1.49.2.2.2.2
date	2012.11.17.08.47.01;	author svnexp;	state Exp;
branches;
next	;

1.47.2.1
date	2009.08.03.08.13.06;	author kensmith;	state Exp;
branches
	1.47.2.1.2.1;
next	1.47.2.2;

1.47.2.2
date	2010.02.07.21.04.26;	author gavin;	state Exp;
branches
	1.47.2.2.2.1
	1.47.2.2.4.1;
next	1.47.2.3;

1.47.2.3
date	2011.06.25.22.22.25;	author dougb;	state Exp;
branches
	1.47.2.3.2.1;
next	1.47.2.4;

1.47.2.4
date	2012.05.13.01.30.08;	author eadler;	state Exp;
branches;
next	1.47.2.5;

1.47.2.5
date	2012.10.05.22.42.57;	author eadler;	state Exp;
branches;
next	1.47.2.6;

1.47.2.6
date	2012.10.26.00.35.28;	author eadler;	state Exp;
branches;
next	1.47.2.7;

1.47.2.7
date	2012.11.17.10.35.57;	author svnexp;	state Exp;
branches;
next	1.47.2.8;

1.47.2.8
date	2013.04.24.05.22.06;	author svnexp;	state Exp;
branches;
next	;

1.47.2.1.2.1
date	2009.10.25.01.10.29;	author kensmith;	state Exp;
branches;
next	;

1.47.2.2.2.1
date	2010.06.14.02.09.06;	author kensmith;	state Exp;
branches;
next	;

1.47.2.2.4.1
date	2010.12.21.17.09.25;	author kensmith;	state Exp;
branches;
next	;

1.47.2.3.2.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.47.2.3.2.2;

1.47.2.3.2.2
date	2012.11.17.08.24.39;	author svnexp;	state Exp;
branches;
next	;

1.42.2.1
date	2007.12.13.05.45.08;	author dougb;	state Exp;
branches
	1.42.2.1.4.1
	1.42.2.1.6.1;
next	1.42.2.2;

1.42.2.2
date	2009.06.05.11.55.32;	author edwin;	state Exp;
branches
	1.42.2.2.2.1;
next	1.42.2.3;

1.42.2.3
date	2010.02.23.21.15.05;	author gavin;	state Exp;
branches
	1.42.2.3.2.1;
next	1.42.2.4;

1.42.2.4
date	2011.06.25.22.36.41;	author dougb;	state Exp;
branches;
next	1.42.2.5;

1.42.2.5
date	2012.05.13.01.30.27;	author eadler;	state Exp;
branches;
next	1.42.2.6;

1.42.2.6
date	2012.10.05.22.42.57;	author eadler;	state Exp;
branches;
next	1.42.2.7;

1.42.2.7
date	2012.10.26.00.35.30;	author eadler;	state Exp;
branches;
next	1.42.2.8;

1.42.2.8
date	2012.11.17.08.01.24;	author svnexp;	state Exp;
branches;
next	;

1.42.2.1.4.1
date	2008.11.25.02.59.29;	author kensmith;	state Exp;
branches;
next	;

1.42.2.1.6.1
date	2009.04.15.03.14.26;	author kensmith;	state Exp;
branches;
next	;

1.42.2.2.2.1
date	2010.02.10.00.26.20;	author kensmith;	state Exp;
branches;
next	;

1.42.2.3.2.1
date	2010.12.21.17.10.29;	author kensmith;	state Exp;
branches;
next	1.42.2.3.2.2;

1.42.2.3.2.2
date	2012.11.17.08.16.38;	author svnexp;	state Exp;
branches;
next	;

1.39.2.1
date	2006.12.13.12.27.08;	author maxim;	state Exp;
branches;
next	1.39.2.2;

1.39.2.2
date	2007.10.24.21.09.34;	author dougb;	state Exp;
branches
	1.39.2.2.2.1;
next	1.39.2.3;

1.39.2.3
date	2007.12.10.19.34.26;	author dougb;	state Exp;
branches
	1.39.2.3.2.1;
next	1.39.2.4;

1.39.2.4
date	2012.11.17.07.39.11;	author svnexp;	state Exp;
branches;
next	;

1.39.2.2.2.1
date	2007.12.13.06.09.08;	author dougb;	state Exp;
branches;
next	;

1.39.2.3.2.1
date	2008.10.02.02.57.24;	author kensmith;	state Exp;
branches;
next	;

1.33.2.1
date	2005.03.10.15.35.31;	author yar;	state Exp;
branches;
next	1.33.2.2;

1.33.2.2
date	2005.03.30.01.07.32;	author murray;	state Exp;
branches;
next	;

1.14.2.1
date	2001.08.01.17.24.03;	author obrien;	state Exp;
branches;
next	1.14.2.2;

1.14.2.2
date	2001.08.15.19.30.18;	author mharo;	state Exp;
branches;
next	1.14.2.3;

1.14.2.3
date	2002.02.28.08.24.30;	author keramida;	state Exp;
branches;
next	1.14.2.4;

1.14.2.4
date	2002.03.24.03.28.46;	author murray;	state Exp;
branches;
next	1.14.2.5;

1.14.2.5
date	2002.07.07.16.17.43;	author mp;	state Exp;
branches;
next	1.14.2.6;

1.14.2.6
date	2002.08.09.20.40.29;	author fanf;	state Exp;
branches;
next	1.14.2.7;

1.14.2.7
date	2002.10.17.07.44.51;	author jmallett;	state Exp;
branches;
next	1.14.2.8;

1.14.2.8
date	2002.10.27.11.05.04;	author blackend;	state Exp;
branches;
next	1.14.2.9;

1.14.2.9
date	2002.10.27.22.03.24;	author blackend;	state Exp;
branches;
next	1.14.2.10;

1.14.2.10
date	2002.11.17.12.06.57;	author joerg;	state Exp;
branches;
next	1.14.2.11;

1.14.2.11
date	2003.03.15.08.48.29;	author dougb;	state Exp;
branches;
next	1.14.2.12;

1.14.2.12
date	2003.08.05.10.03.09;	author schweikh;	state Exp;
branches;
next	1.14.2.13;

1.14.2.13
date	2004.03.30.18.48.03;	author des;	state Exp;
branches;
next	1.14.2.14;

1.14.2.14
date	2012.11.17.07.22.43;	author svnexp;	state Exp;
branches;
next	;


desc
@@


1.56
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248580
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@This fortune brought to you by:
$FreeBSD: head/games/fortune/datfiles/freebsd-tips 248580 2013-03-21 12:42:25Z eadler $
%
Any user that is a member of the wheel group can use "su -" to simulate
a root login. You can add a user to the wheel group by editing /etc/group.
		-- Konstantinos Konstantinidis <kkonstan@@duth.gr>
%
By pressing "Scroll Lock" you can use the arrow keys to scroll backward
through the console output.  Press "Scroll Lock" again to turn it off.
%
Can't remember if you've installed a certain port or not? Try "pkg_info
-Ix port_name".
%
Ever wonder what those numbers after command names were, as in cat(1)?  It's
the section of the manual the man page is in.  "man man" will tell you more.
		-- David Scheidt <dscheidt@@tumbolia.com>
%
Forget how to spell a word or a variation of a word? Use

	look portion_of_word_you_know
		-- Dru <genesis@@istar.ca>
%
Forget what directory you are in? Type "pwd".
		-- Dru <genesis@@istar.ca>
%
Forget when Easter is? Try "ncal -e". If you need the date for Orthodox
Easter, use "ncal -o" instead.
		-- Dru <genesis@@istar.ca>
%
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.
%
Handy bash(1) prompt:  PS1="\u@@\h \w \!$ "
		-- David Scheidt <dscheidt@@tumbolia.com>
%
Having trouble using fetch through a firewall? Try setting the environment
variable FTP_PASSIVE_MODE to yes, and see fetch(3) for more details.
%
If other operating systems have damaged your Master Boot Record, you can
reinstall it with boot0cfg(8). See
"man boot0cfg" for details.
%
If you accidentally end up inside vi, you can quit it by pressing Escape, colon
(:), q (q), bang (!) and pressing return.
%
If you are in the C shell and have just installed a new program, you won't
be able to run it unless you first type "rehash".
		-- Dru <genesis@@istar.ca>
%
If you do not want to get beeps in X11 (X Windows), you can turn them off with

	xset b off
%
If you have a CD-ROM drive in your machine, you can make the CD-ROM that is
presently inserted available by typing 'mount /cdrom' as root.  The CD-ROM
will be available under /cdrom/.  Remember to do 'umount /cdrom' before
removing the CD-ROM (it will usually not be possible to remove the CD-ROM
without doing this.)

Note: This tip may not work in all configurations.
%
If you need a reminder to leave your terminal, type "leave +hhmm" where
"hhmm" represents in how many hours and minutes you need to leave.
		-- Dru <genesis@@istar.ca>
%
If you need to ask a question on the FreeBSD-questions mailing list then

	http://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/\
		freebsd-questions/index.html

contains lots of useful advice to help you get the best results.
%
If you write part of a filename in tcsh,
pressing TAB will show you the available choices when there
is more than one, or complete the filename if there's only one match.
%
If you `set watch = (0 any any)' in tcsh, you will be notified when
someone logs in or out of your system.
%
If you use the C shell, add the following line to the .cshrc file in your
home directory to prevent core files from being written to disk:

	limit coredumpsize 0
		-- Dru <genesis@@istar.ca>
%
If you want df(1) and other commands to display disk sizes in
kilobytes instead of 512-byte blocks, set BLOCKSIZE in your
environment to 'K'.  You can also use 'M' for Megabytes or 'G' for
Gigabytes.  If you want df(1) to automatically select the best size
then use 'df -h'.
%
If you want to play CDs with FreeBSD, a utility for this is already included.
Type 'cdcontrol' then 'help' to learn more.  (You may need to set the CDROM
environment variable in order to make cdcontrol want to start.)
%
If you want to quickly check for duplicate package/port installations,
try the following pkg_info command.

	pkg_info | sort | sed -e 's/-[0-9].*$//' | \
	uniq -c | grep -v '^[[:space:]]*1'
%
If you'd like to keep track of applications in the FreeBSD ports tree, take a
look at FreshPorts;

	http://www.freshports.org/
%
In order to make fetch (the FreeBSD downloading tool) ask for
username/password when it encounters a password-protected web page, you can set
the environment variable HTTP_AUTH to 'basic:*'.
%
In order to search for a string in some files, use 'grep' like this:

	 grep "string" filename1 [filename2 filename3 ...]

This will print out the lines in the files that contain the string.  grep can
also do a lot more advanced searches - type 'man grep' for details.
%
In order to support national characters for European languages in tools like
less without creating other nationalisation aspects, set the environment
variable LC_ALL to 'en_US.ISO8859-1'.
%
"man firewall" will give advice for building a FreeBSD firewall
		-- David Scheidt <dscheidt@@tumbolia.com>
%
"man hier" will explain the way FreeBSD filesystems are normally laid out.
		-- David Scheidt <dscheidt@@tumbolia.com>
%
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).
You can get an introduction to each topic by typing

	man <number> intro

In other words, to get the intro to general commands, type

	man 1 intro
%
"man ports" gives many useful hints about installing FreeBSD ports.
%
"man security" gives very good advice on how to tune the security of your
FreeBSD system.
%
"man tuning" gives some tips how to tune performance of your FreeBSD system.
		-- David Scheidt <dscheidt@@tumbolia.com>
%
Need to do a search in a manpage or in a file you've sent to a pager? Use
"/search_word". To repeat the same search, type "n" for next.
		-- Dru <genesis@@istar.ca>
%
Need to find the location of a program? Use "locate program_name".
		-- Dru <genesis@@istar.ca>
%
Need to leave your terminal for a few minutes and don't want to logout?
Use "lock -p". When you return, use your password as the key to unlock the
terminal.
		-- Dru <genesis@@istar.ca>
%
Need to print a manpage? Use

	man name_of_manpage | col -bx | lpr
		-- Dru <genesis@@istar.ca>
%
Need to quickly empty a file? Use ": > filename".
		-- Dru <genesis@@istar.ca>
%
Need to quickly return to your home directory? Type "cd".
		-- Dru <genesis@@istar.ca>
%
Need to remove all those ^M characters from a DOS file? Try

	tr -d \\r < dosfile > newfile
		-- Originally by Dru <genesis@@istar.ca>
%
Need to see the calendar for this month? Simply type "cal".  To see the
whole year, type "cal -y".
		-- Dru <genesis@@istar.ca>
%
Need to see which daemons are listening for connection requests? Use
"sockstat -4l" for IPv4, and "sockstat -l" for IPv4 and IPv6.
		-- Dru <genesis@@istar.ca>
%
Need to see your routing table? Type "netstat -rn". The entry with the G
flag is your gateway.
		-- Dru <genesis@@istar.ca>
%
Nice bash prompt: PS1='(\[$(tput md)\]\t <\w>\[$(tput me)\]) $(echo $?) \$ '
		-- Mathieu <mathieu@@hal.interactionvirtuelle.com>
%
Over quota?  "du -s * | sort -n " will give you a sorted list of your
directory sizes.
		-- David Scheidt <dscheidt@@tumbolia.com>
%
nc(1) (or netcat) is useful not only for redirecting input/output to
TCP or UDP connections, but also for proxying them with inetd(8).
%
sh (the default Bourne shell in FreeBSD) supports command-line editing.  Just
``set -o emacs'' or ``set -o vi'' to enable it.
%
Simple tcsh prompt: set prompt = '%# '
%
The default editor in FreeBSD is vi, which is efficient to use when you have
learned it, but somewhat user-unfriendly.  To use ee (an easier but less
powerful editor) instead, set the environment variable EDITOR to /usr/bin/ee
%
Time to change your password? Type "passwd" and follow the prompts.
		-- Dru <genesis@@istar.ca>
%
To change an environment variable in /bin/sh use:

	$ VARIABLE="value"
	$ export VARIABLE
%
To change an environment variable in tcsh you use: setenv NAME "value"
where NAME is the name of the variable and "value" its new value.
%
To clear the screen, use "clear". To re-display your screen buffer, press
the scroll lock key and use your page up button. When you're finished,
press the scroll lock key again to get your prompt back.
		-- Dru <genesis@@istar.ca>
%
To determine whether a file is a text file, executable, or some other type
of file, use

	file filename
		-- Dru <genesis@@istar.ca>
%
To do a fast search for a file, try

	 locate filename

locate uses a database that is updated every Saturday (assuming your computer
is running FreeBSD at the time) to quickly find files based on name only.
%
To erase a line you've written at the command prompt, use "Ctrl-U".
		-- Dru <genesis@@istar.ca>
%
To find out the hostname associated with an IP address, use

	dig -x IP_address
		-- Dru <genesis@@istar.ca>
%
To obtain a neat PostScript rendering of a manual page, use ``-t'' switch
of the man(1) utility: ``man -t <topic>''.  For example:

	man -t grep > grep.ps	# Save the PostScript version to a file
or
	man -t printf | lp	# Send the PostScript directly to printer
%
To quickly create an empty file, use "touch filename".
		-- Dru <genesis@@istar.ca>
%
To read a compressed file without having to first uncompress it, use
"zcat" or "zless" to view it.
		-- Dru <genesis@@istar.ca>
%
To repeat the last command in the C shell, type "!!".
		-- Dru <genesis@@istar.ca>
%
To save disk space in your home directory, compress files you rarely
use with "gzip filename".
		-- Dru <genesis@@istar.ca>
%
To search for files that match a particular name, use find(1); for example

	find / -name "*GENERIC*" -ls

will search '/', and all subdirectories, for files with 'GENERIC' in the name.
      	--  Stephen Hilton <nospam@@hiltonbsd.com>
%
To see all of the directories on your FreeBSD system, type

	find / -type d | less

All the files?

	find / -type f | less
%
To see how long it takes a command to run, type the word "time" before the
command name.
		-- Dru <genesis@@istar.ca>
%
To see how much disk space is left on your partitions, use

	df -h
		-- Dru <genesis@@istar.ca>
%
To see the 10 largest files on a directory or partition, use

	du /partition_or_directory_name | sort -rn | head
		-- Dru <genesis@@istar.ca>
%
To see the IP addresses currently set on your active interfaces, type
"ifconfig -u".
		-- Dru <genesis@@istar.ca>
%
To see the last 10 lines of a long file, use "tail filename". To see the
first 10 lines, use "head filename".
		-- Dru <genesis@@istar.ca>
%
To see the last time that you logged in, use lastlogin(8).
		-- Dru <genesis@@istar.ca>
%
To see the MAC addresses of the NICs on your system, type

	ifconfig -a
		-- Dru <genesis@@istar.ca>
%
To see the output from when your computer started, run dmesg(8).  If it has
been replaced with other messages, look at /var/run/dmesg.boot.
		-- Francisco Reyes <lists@@natserv.com>
%
Want colour in your directory listings?  Use "ls -G".  "ls -F" is also useful,
and they can be combined as "ls -FG".
%
Want to find a specific port, just type the following under /usr/ports
or one its subdirectories:

	make search name=<port-name>
    or
	make search key=<keyword>
%
Want to know how many words, lines, or bytes are contained in a file? Type
"wc filename".
		-- Dru <genesis@@istar.ca>
%
Want to see how much virtual memory you're using? Just type "swapinfo" to
be shown information about the usage of your swap partitions.
%
Want to strip UTF-8 BOM(Byte Order Mark) from given files?

	sed -e '1s/^\xef\xbb\xbf//' < bomfile > newfile
%
Want to use sed(1) to edit a file in place?  Well, to replace every 'e' with
an 'o', in a file named 'foo', you can do:

	sed -i.bak s/e/o/g foo

And you'll get a backup of the original in a file named 'foo.bak', but if you
want no backup:

	sed -i '' s/e/o/g foo
%
When you've made modifications to a file in vi(1) and then find that
you can't write it, type ``<ESC>!rm -f %'' then ``:w!'' to force the
write

This won't work if you don't have write permissions to the directory
and probably won't be suitable if you're editing through a symbolic link.
%
You can adjust the volume of various parts of the sound system in your
computer by typing 'mixer <type> <volume>'.  To get a list of what you can
adjust, just type 'mixer'.
%
You can automatically download and install binary packages by doing

	pkg_add -r <URL>

where you replace <URL> with the URL to the package.  This will also
automatically install the packages the package you download is dependent on
(ie, the packages it needs in order to work.)
%
You can change the video mode on all consoles by adding something like
the following to /etc/rc.conf:

	allscreens="80x30"

You can use "vidcontrol -i mode | grep T" for a list of supported text
modes.
		-- Konstantinos Konstantinidis <kkonstan@@duth.gr>
%
You can disable tcsh's terminal beep if you `set nobeep'.
%
You can install extra packages for FreeBSD by using the ports system.
If you have installed it, you can download, compile, and install software by
just typing

	# cd /usr/ports/<category>/<portname>
	# make install && make clean

as root.  The ports infrastructure will download the software, change it so
it works on FreeBSD, compile it, install it, register the installation so it
will be possible to automatically uninstall it, and clean out the temporary
working space it used.  You can remove an installed port you decide you do not
want after all by typing

	# cd /usr/ports/<category>/<portname>
	# make deinstall

as root.
%
You can look through a file in a nice text-based interface by typing

	less filename
%
You can make a log of your terminal session with script(1).
%
You can often get answers to your questions about FreeBSD by searching in the
FreeBSD mailing list archives at

	http://www.FreeBSD.org/search/search.html
%
You can open up a new split-screen window in (n)vi with :N or :E and then
use ^w to switch between the two.
%
You can permanently set environment variables for your shell by putting them
in a startup file for the shell.  The name of the startup file varies
depending on the shell - csh and tcsh uses .login, bash, sh, ksh and zsh use
.profile.  When using bash, sh, ksh or zsh, don't forget to export the
variable.
%
You can press Ctrl-D to quickly exit from a shell, or logout from a
login shell.
		-- Konstantinos Konstantinidis <kkonstan@@duth.gr>
%
You can press Ctrl-L while in the shell to clear the screen.
%
You can press up-arrow or down-arrow to walk through a list of
previous commands in tcsh.
%
You can search for documentation on a keyword by typing

	apropos keyword
%
You can `set autologout = 30' to have tcsh log you off automatically
if you leave the shell idle for more than 30 minutes.
%
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'.  To list all
aliases, you can usually type just 'alias'.
%
You can use /etc/make.conf to control the options used to compile software
on this system.  Example entries are in
/usr/share/examples/etc/make.conf.
%
You can use "pkg_info" to see a list of packages you have installed.
		-- Konstantinos Konstantinidis <kkonstan@@duth.gr>
%
You can use the 'fetch' command to retrieve files over ftp or http.

	 fetch http://www.FreeBSD.org/index.html

will download the front page of the FreeBSD web site.
%
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".
		-- Konstantinos Konstantinidis <kkonstan@@duth.gr>
%
Want to run the same command again?
In tcsh you can type "!!"
%
Want to go the directory you were just in?
Type "cd -"
%
@


1.56.2.1
log
@file freebsd-tips was added on branch RELENG_8_4 on 2013-03-28 13:02:45 +0000
@
text
@d1 472
@


1.56.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 482
This fortune brought to you by:
$FreeBSD: releng/8.4/games/fortune/datfiles/freebsd-tips 242110 2012-10-26 00:35:28Z eadler $
%
Any user that is a member of the wheel group can use "su -" to simulate
a root login. You can add a user to the wheel group by editing /etc/group.
		-- Konstantinos Konstantinidis <kkonstan@@duth.gr>
%
By pressing "Scroll Lock" you can use the arrow keys to scroll backward
through the console output.  Press "Scroll Lock" again to turn it off.
%
Can't remember if you've installed a certain port or not? Try "pkg_info
-Ix port_name".
%
Ever wonder what those numbers after command names were, as in cat(1)?  It's
the section of the manual the man page is in.  "man man" will tell you more.
		-- David Scheidt <dscheidt@@tumbolia.com>
%
Forget how to spell a word or a variation of a word? Use

	look portion_of_word_you_know
		-- Dru <genesis@@istar.ca>
%
Forget what directory you are in? Type "pwd".
		-- Dru <genesis@@istar.ca>
%
Forget when Easter is? Try "ncal -e". If you need the date for Orthodox
Easter, use "ncal -o" instead.
		-- Dru <genesis@@istar.ca>
%
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.
%
Handy bash(1) prompt:  PS1="\u@@\h \w \!$ "
		-- David Scheidt <dscheidt@@tumbolia.com>
%
Having trouble using fetch through a firewall? Try setting the environment
variable FTP_PASSIVE_MODE to yes, and see fetch(3) for more details.
%
If other operating systems have damaged your Master Boot Record, you can
reinstall it with boot0cfg(8). See
"man boot0cfg" for details.
%
If you accidentally end up inside vi, you can quit it by pressing Escape, colon
(:), q (q), bang (!) and pressing return.
%
If you are in the C shell and have just installed a new program, you won't
be able to run it unless you first type "rehash".
		-- Dru <genesis@@istar.ca>
%
If you do not want to get beeps in X11 (X Windows), you can turn them off with

	xset b off
%
If you have a CD-ROM drive in your machine, you can make the CD-ROM that is
presently inserted available by typing 'mount /cdrom' as root.  The CD-ROM
will be available under /cdrom/.  Remember to do 'umount /cdrom' before
removing the CD-ROM (it will usually not be possible to remove the CD-ROM
without doing this.)

Note: This tip may not work in all configurations.
%
If you need a reminder to leave your terminal, type "leave +hhmm" where
"hhmm" represents in how many hours and minutes you need to leave.
		-- Dru <genesis@@istar.ca>
%
If you need to ask a question on the FreeBSD-questions mailing list then

	http://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/\
		freebsd-questions/index.html

contains lots of useful advice to help you get the best results.
%
If you write part of a filename in tcsh,
pressing TAB will show you the available choices when there
is more than one, or complete the filename if there's only one match.
%
If you `set watch = (0 any any)' in tcsh, you will be notified when
someone logs in or out of your system.
%
If you use the C shell, add the following line to the .cshrc file in your
home directory to prevent core files from being written to disk:

	limit coredumpsize 0
		-- Dru <genesis@@istar.ca>
%
If you want df(1) and other commands to display disk sizes in
kilobytes instead of 512-byte blocks, set BLOCKSIZE in your
environment to 'K'.  You can also use 'M' for Megabytes or 'G' for
Gigabytes.  If you want df(1) to automatically select the best size
then use 'df -h'.
%
If you want to play CDs with FreeBSD, a utility for this is already included.
Type 'cdcontrol' then 'help' to learn more.  (You may need to set the CDROM
environment variable in order to make cdcontrol want to start.)
%
If you want to quickly check for duplicate package/port installations,
try the following pkg_info command.

	pkg_info | sort | sed -e 's/-[0-9].*$//' | \
	uniq -c | grep -v '^[[:space:]]*1'
%
If you'd like to keep track of applications in the FreeBSD ports tree, take a
look at FreshPorts;

	http://www.freshports.org/
%
In order to make fetch (the FreeBSD downloading tool) ask for
username/password when it encounters a password-protected web page, you can set
the environment variable HTTP_AUTH to 'basic:*'.
%
In order to search for a string in some files, use 'grep' like this:

	 grep "string" filename1 [filename2 filename3 ...]

This will print out the lines in the files that contain the string.  grep can
also do a lot more advanced searches - type 'man grep' for details.
%
In order to support national characters for European languages in tools like
less without creating other nationalisation aspects, set the environment
variable LC_ALL to 'en_US.ISO8859-1'.
%
"man firewall" will give advice for building a FreeBSD firewall
		-- David Scheidt <dscheidt@@tumbolia.com>
%
"man hier" will explain the way FreeBSD filesystems are normally laid out.
		-- David Scheidt <dscheidt@@tumbolia.com>
%
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).
You can get an introduction to each topic by typing

	man <number> intro

In other words, to get the intro to general commands, type

	man 1 intro
%
"man ports" gives many useful hints about installing FreeBSD ports.
%
"man security" gives very good advice on how to tune the security of your
FreeBSD system.
%
"man tuning" gives some tips how to tune performance of your FreeBSD system.
		-- David Scheidt <dscheidt@@tumbolia.com>
%
Need to do a search in a manpage or in a file you've sent to a pager? Use
"/search_word". To repeat the same search, type "n" for next.
		-- Dru <genesis@@istar.ca>
%
Need to find the location of a program? Use "locate program_name".
		-- Dru <genesis@@istar.ca>
%
Need to leave your terminal for a few minutes and don't want to logout?
Use "lock -p". When you return, use your password as the key to unlock the
terminal.
		-- Dru <genesis@@istar.ca>
%
Need to print a manpage? Use

	man name_of_manpage | col -bx | lpr
		-- Dru <genesis@@istar.ca>
%
Need to quickly empty a file? Use ": > filename".
		-- Dru <genesis@@istar.ca>
%
Need to quickly return to your home directory? Type "cd".
		-- Dru <genesis@@istar.ca>
%
Need to remove all those ^M characters from a DOS file? Try

	tr -d \\r < dosfile > newfile
		-- Originally by Dru <genesis@@istar.ca>
%
Need to see the calendar for this month? Simply type "cal".  To see the
whole year, type "cal -y".
		-- Dru <genesis@@istar.ca>
%
Need to see which daemons are listening for connection requests? Use
"sockstat -4l" for IPv4, and "sockstat -l" for IPv4 and IPv6.
		-- Dru <genesis@@istar.ca>
%
Need to see your routing table? Type "netstat -rn". The entry with the G
flag is your gateway.
		-- Dru <genesis@@istar.ca>
%
Nice bash prompt: PS1='(\[$(tput md)\]\t <\w>\[$(tput me)\]) $(echo $?) \$ '
		-- Mathieu <mathieu@@hal.interactionvirtuelle.com>
%
Over quota?  "du -s * | sort -n " will give you a sorted list of your
directory sizes.
		-- David Scheidt <dscheidt@@tumbolia.com>
%
nc(1) (or netcat) is useful not only for redirecting input/output to
TCP or UDP connections, but also for proxying them with inetd(8).
%
sh (the default Bourne shell in FreeBSD) supports command-line editing.  Just
``set -o emacs'' or ``set -o vi'' to enable it.
%
Simple tcsh prompt: set prompt = '%# '
%
The default editor in FreeBSD is vi, which is efficient to use when you have
learned it, but somewhat user-unfriendly.  To use ee (an easier but less
powerful editor) instead, set the environment variable EDITOR to /usr/bin/ee
%
Time to change your password? Type "passwd" and follow the prompts.
		-- Dru <genesis@@istar.ca>
%
To change an environment variable in /bin/sh use:

	$ VARIABLE="value"
	$ export VARIABLE
%
To change an environment variable in tcsh you use: setenv NAME "value"
where NAME is the name of the variable and "value" its new value.
%
To clear the screen, use "clear". To re-display your screen buffer, press
the scroll lock key and use your page up button. When you're finished,
press the scroll lock key again to get your prompt back.
		-- Dru <genesis@@istar.ca>
%
To determine whether a file is a text file, executable, or some other type
of file, use

	file filename
		-- Dru <genesis@@istar.ca>
%
To do a fast search for a file, try

	 locate filename

locate uses a database that is updated every Saturday (assuming your computer
is running FreeBSD at the time) to quickly find files based on name only.
%
To erase a line you've written at the command prompt, use "Ctrl-U".
		-- Dru <genesis@@istar.ca>
%
To find out the hostname associated with an IP address, use

	dig -x IP_address
		-- Dru <genesis@@istar.ca>
%
To obtain a neat PostScript rendering of a manual page, use ``-t'' switch
of the man(1) utility: ``man -t <topic>''.  For example:

	man -t grep > grep.ps	# Save the PostScript version to a file
or
	man -t printf | lp	# Send the PostScript directly to printer
%
To quickly create an empty file, use "touch filename".
		-- Dru <genesis@@istar.ca>
%
To read a compressed file without having to first uncompress it, use
"zcat" or "zless" to view it.
		-- Dru <genesis@@istar.ca>
%
To repeat the last command in the C shell, type "!!".
		-- Dru <genesis@@istar.ca>
%
To save disk space in your home directory, compress files you rarely
use with "gzip filename".
		-- Dru <genesis@@istar.ca>
%
To search for files that match a particular name, use find(1); for example

	find / -name "*GENERIC*" -ls

will search '/', and all subdirectories, for files with 'GENERIC' in the name.
      	--  Stephen Hilton <nospam@@hiltonbsd.com>
%
To see all of the directories on your FreeBSD system, type

	find / -type d | less

All the files?

	find / -type f | less
%
To see how long it takes a command to run, type the word "time" before the
command name.
		-- Dru <genesis@@istar.ca>
%
To see how much disk space is left on your partitions, use

	df -h
		-- Dru <genesis@@istar.ca>
%
To see the 10 largest files on a directory or partition, use

	du /partition_or_directory_name | sort -rn | head
		-- Dru <genesis@@istar.ca>
%
To see the IP addresses currently set on your active interfaces, type
"ifconfig -u".
		-- Dru <genesis@@istar.ca>
%
To see the last 10 lines of a long file, use "tail filename". To see the
first 10 lines, use "head filename".
		-- Dru <genesis@@istar.ca>
%
To see the last time that you logged in, use lastlogin(8).
		-- Dru <genesis@@istar.ca>
%
To see the MAC addresses of the NICs on your system, type

	ifconfig -a
		-- Dru <genesis@@istar.ca>
%
To see the output from when your computer started, run dmesg(8).  If it has
been replaced with other messages, look at /var/run/dmesg.boot.
		-- Francisco Reyes <lists@@natserv.com>
%
Want colour in your directory listings?  Use "ls -G".  "ls -F" is also useful,
and they can be combined as "ls -FG".
%
Want to find a specific port, just type the following under /usr/ports
or one its subdirectories:

	make search name=<port-name>
    or
	make search key=<keyword>
%
Want to know how many words, lines, or bytes are contained in a file? Type
"wc filename".
		-- Dru <genesis@@istar.ca>
%
Want to see how much virtual memory you're using? Just type "swapinfo" to
be shown information about the usage of your swap partitions.
%
Want to strip UTF-8 BOM(Byte Order Mark) from given files?

	sed -e '1s/^\xef\xbb\xbf//' < bomfile > newfile
%
Want to use sed(1) to edit a file in place?  Well, to replace every 'e' with
an 'o', in a file named 'foo', you can do:

	sed -i.bak s/e/o/g foo

And you'll get a backup of the original in a file named 'foo.bak', but if you
want no backup:

	sed -i '' s/e/o/g foo
%
When you've made modifications to a file in vi(1) and then find that
you can't write it, type ``<ESC>!rm -f %'' then ``:w!'' to force the
write

This won't work if you don't have write permissions to the directory
and probably won't be suitable if you're editing through a symbolic link.
%
You can adjust the volume of various parts of the sound system in your
computer by typing 'mixer <type> <volume>'.  To get a list of what you can
adjust, just type 'mixer'.
%
You can automatically download and install binary packages by doing

	pkg_add -r <URL>

where you replace <URL> with the URL to the package.  This will also
automatically install the packages the package you download is dependent on
(ie, the packages it needs in order to work.)
%
You can change the video mode on all consoles by adding something like
the following to /etc/rc.conf:

	allscreens="80x30"

You can use "vidcontrol -i mode | grep T" for a list of supported text
modes.
		-- Konstantinos Konstantinidis <kkonstan@@duth.gr>
%
You can disable tcsh's terminal beep if you `set nobeep'.
%
You can get a good generic server install by using the
instant-server port/package.  If you have ports installed, you can
install it by doing

	# cd /usr/ports/misc/instant-server
	# make install && make clean

as root.  This will install a collection of packages that is appropriate for
running a "generic" server.
%
You can install extra packages for FreeBSD by using the ports system.
If you have installed it, you can download, compile, and install software by
just typing

	# cd /usr/ports/<category>/<portname>
	# make install && make clean

as root.  The ports infrastructure will download the software, change it so
it works on FreeBSD, compile it, install it, register the installation so it
will be possible to automatically uninstall it, and clean out the temporary
working space it used.  You can remove an installed port you decide you do not
want after all by typing

	# cd /usr/ports/<category>/<portname>
	# make deinstall

as root.
%
You can look through a file in a nice text-based interface by typing

	less filename
%
You can make a log of your terminal session with script(1).
%
You can often get answers to your questions about FreeBSD by searching in the
FreeBSD mailing list archives at

	http://www.FreeBSD.org/search/search.html
%
You can open up a new split-screen window in (n)vi with :N or :E and then
use ^w to switch between the two.
%
You can permanently set environment variables for your shell by putting them
in a startup file for the shell.  The name of the startup file varies
depending on the shell - csh and tcsh uses .login, bash, sh, ksh and zsh use
.profile.  When using bash, sh, ksh or zsh, don't forget to export the
variable.
%
You can press Ctrl-D to quickly exit from a shell, or logout from a
login shell.
		-- Konstantinos Konstantinidis <kkonstan@@duth.gr>
%
You can press Ctrl-L while in the shell to clear the screen.
%
You can press up-arrow or down-arrow to walk through a list of
previous commands in tcsh.
%
You can search for documentation on a keyword by typing

	apropos keyword
%
You can `set autologout = 30' to have tcsh log you off automatically
if you leave the shell idle for more than 30 minutes.
%
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'.  To list all
aliases, you can usually type just 'alias'.
%
You can use /etc/make.conf to control the options used to compile software
on this system.  Example entries are in
/usr/share/examples/etc/make.conf.
%
You can use "pkg_info" to see a list of packages you have installed.
		-- Konstantinos Konstantinidis <kkonstan@@duth.gr>
%
You can use the 'fetch' command to retrieve files over ftp or http.

	 fetch http://www.FreeBSD.org/index.html

will download the front page of the FreeBSD web site.
%
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".
		-- Konstantinos Konstantinidis <kkonstan@@duth.gr>
%
Want to run the same command again?
In tcsh you can type "!!"
%
Want to go the directory you were just in?
Type "cd -"
%
@


1.55
log
@Switching exporter and resync
@
text
@d2 1
a2 1
$FreeBSD: head/games/fortune/datfiles/freebsd-tips 241934 2012-10-23 15:03:25Z eadler $
a375 10
You can get a good generic server install by using the
instant-server port/package.  If you have ports installed, you can
install it by doing

	# cd /usr/ports/misc/instant-server
	# make install && make clean

as root.  This will install a collection of packages that is appropriate for
running a "generic" server.
%
@


1.54
log
@SVN rev 241934 on 2012-10-23 15:03:25Z by eadler

Remove extra word:

Submitted by:	many
Approved by:	cperciva (implicit)
MFC after:	3 days
@
text
@d2 1
a2 1
$FreeBSD$
@


1.53
log
@SVN rev 241845 on 2012-10-22 03:00:43Z by eadler

Sysinstall has been removed from base.

Approved by:	cperciva
@
text
@d43 1
a43 1
reinstall it either with boot0cfg(8). See
@


1.52
log
@SVN rev 241116 on 2012-10-02 00:30:15Z by eadler

Correct the tip about finding all the directories on the system
Add a tip about clearing the screen.
Make things more consistent by removing quotes around 'make search'

Approved by:	cperciva
MFC after:	3 days
@
text
@d43 1
a43 1
reinstall it either with /usr/sbin/sysinstall or with boot0cfg(8). See
@


1.51
log
@SVN rev 235227 on 2012-05-10 12:46:12Z by eadler

Partial revert of previous commit as some of the changes were not
newbie-friendly.

Requested by:	jhb, gcooper
Approved by:	cperciva (implicit)
MFC after:	3 days
X-MFC-With:	r235209
@
text
@d275 5
a279 2
	ls -R / | less
		-- Dru <genesis@@istar.ca>
d321 1
a321 1
	"make search name=<port-name>"
d323 1
a323 1
	"make search key=<keyword>"
d428 2
@


1.50
log
@SVN rev 235209 on 2012-05-09 22:13:56Z by eadler

Add a few new tips and update some old ones to more modern commands

MFC after:	1 week
@
text
@d76 1
d315 1
a315 1
Want to find a specific port, just type the following
d318 1
a318 1
	"make -C /usr/ports search name=<port-name>"
d320 1
a320 1
	"make -C /usr/ports search key=<keyword>"
d476 1
a476 1
In tcsh you can type "cd -"
@


1.49
log
@SVN rev 211094 on 2010-08-09 09:26:17Z by fjoe

"whereis netscape" gives empty output for quite a long time already.
Suggest to use "whereis firefox" instead.
@
text
@d76 1
a76 2
If you `set filec' (file completion) in tcsh and write a part of the
filename, pressing TAB will show you the available choices when there
a123 3
In tcsh, you can `set autolist' to have the shell automatically show
all the possible matches when doing filename/directory expansion.
%
a190 7
Nice tcsh prompts:
	set prompt = '[%B%m%b] %B%~%b%# '
	set prompt = '%m %# '
	set prompt = '%n@@%m%# '
	set prompt = '%n@@%m:%/%# '
	set prompt = '%n@@%m:%~%# '
%
d255 1
a255 1
"zcat" or "zmore" to view it.
d274 1
a274 1
	ls -R / | more
d314 1
a314 1
Want to find a specific port, just type the following under /usr/ports,
d317 1
a317 1
	"make search name=<port-name>"
d319 1
a319 1
	"make search key=<keyword>"
d471 6
@


1.49.2.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.49.2.2
log
@SVN rev 235382 on 2012-05-13 01:29:49Z by eadler

MFC r235209 r235227:
	Add a few new tips and update some old ones to more modern commands

Approved by:	cperciva (implicit)
@
text
@d76 2
a77 2
If you write part of a filename in tcsh,
pressing TAB will show you the available choices when there
d125 3
d195 7
d266 1
a266 1
"zcat" or "zless" to view it.
d285 1
a285 1
	ls -R / | less
d325 1
a325 1
Want to find a specific port, just type the following under /usr/ports
a481 6
Want to run the same command again?
In tcsh you can type "!!"
%
Want to go the directory you were just in?
Type "cd -"
%
@


1.49.2.3
log
@SVN rev 241240 on 2012-10-05 22:42:57Z by eadler

MFC r241116:
	Correct the tip about finding all the directories on the system
	Add a tip about clearing the screen.
	Make things more consistent by removing quotes around 'make search'

Approved by:	cperciva (implicit)
@
text
@d275 2
a276 5
	find / -type d | less

All the files?

	find / -type f | less
d318 1
a318 1
	make search name=<port-name>
d320 1
a320 1
	make search key=<keyword>
a424 2
You can press Ctrl-L while in the shell to clear the screen.
%
@


1.49.2.4
log
@SVN rev 242109 on 2012-10-26 00:34:27Z by eadler

MFC r241845,r241934:
	Sysinstall has been removed from base.

Approved by:	cperciva (implicit)
@
text
@d43 1
a43 1
reinstall it with boot0cfg(8). See
@


1.49.2.5
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d2 1
a2 1
$FreeBSD: stable/9/games/fortune/datfiles/freebsd-tips 242109 2012-10-26 00:34:27Z eadler $
@


1.49.2.6
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/249828
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d2 1
a2 1
$FreeBSD: stable/9/games/fortune/datfiles/freebsd-tips 249828 2013-04-24 04:21:19Z eadler $
d376 10
@


1.49.2.2.2.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.49.2.2.2.2
log
@Switch importer
@
text
@d2 1
a2 1
$FreeBSD: releng/9.1/games/fortune/datfiles/freebsd-tips 235382 2012-05-13 01:29:49Z eadler $
@


1.49.2.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.49.2.1.2.2
log
@Switch importer
@
text
@d2 1
a2 1
$FreeBSD: releng/9.0/games/fortune/datfiles/freebsd-tips 211094 2010-08-09 09:26:17Z fjoe $
@


1.48
log
@SVN rev 202115 on 2010-01-11 21:17:49Z by gavin

Our standard "xterm" termcap entry supports colour, so this tip is redundant.
As it happens, "xterm-color" has just been an alias for "xterm" since
src/share/termcap/termcap.src 1.131 in September 2002.

PR:		docs/132959
Approved by:	ed (mentor)
@
text
@d479 1
a479 1
Try "whereis netscape" and "whereis whereis".
@


1.47
log
@SVN rev 187110 on 2009-01-12 19:17:43Z by simon

netcat is "now" in base, so point people at nc(1) instead of the port.

MFC after:	1 week
@
text
@a52 12
If you are running xterm, the default TERM variable will be 'xterm'.  If you
set this environment variable to 'xterm-color' instead, a lot of programs will
use colors.  You can do this by

	TERM=xterm-color; export TERM

in Bourne-derived shells, and

	setenv TERM xterm-color

in csh-derived shells.
%
@


1.47.2.1
log
@SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)
@
text
@@


1.47.2.2
log
@SVN rev 203638 on 2010-02-07 21:04:26Z by gavin

Merge r202115 from head:

  Our standard "xterm" termcap entry supports colour, so this tip is redundant.
  As it happens, "xterm-color" has just been an alias for "xterm" since
  src/share/termcap/termcap.src 1.131 in September 2002.

PR:		docs/132959
@
text
@d53 12
@


1.47.2.3
log
@SVN rev 223547 on 2011-06-25 22:22:25Z by dougb

MFC r211094:
  "whereis netscape" gives empty output for quite a long time already.
  Suggest to use "whereis firefox" instead.

MFC r212168:
  fix the move so that it matches what the rest of the internet
  says about this game...  This move also makes more sense...

MFC r213287
  Add advice to new fathers from Thomas Ptacek.

MFC r221908
  fortune(6): fix typos and misspellings.

  While here, drop words in the spelling files that are no longer used
  anywhere.

  Speling errors found via:	codespell from Lucas De Marchi

MFC r221909
  Convert a file to UTF-8. This only changes a character in the
  copyright section and will not require UTF-8 for fortune(6).

MFC r222890
  Minor typo, fix 2 attributions
@
text
@d479 1
a479 1
Try "whereis firefox" and "whereis whereis".
@


1.47.2.4
log
@SVN rev 235383 on 2012-05-13 01:30:08Z by eadler

MFC r235209 r235227:
	Add a few new tips and update some old ones to more modern commands

Approved by:	cperciva (implicit)
@
text
@d76 2
a77 2
If you write part of a filename in tcsh,
pressing TAB will show you the available choices when there
d125 3
d195 7
d266 1
a266 1
"zcat" or "zless" to view it.
d285 1
a285 1
	ls -R / | less
d325 1
a325 1
Want to find a specific port, just type the following under /usr/ports
a481 6
Want to run the same command again?
In tcsh you can type "!!"
%
Want to go the directory you were just in?
Type "cd -"
%
@


1.47.2.5
log
@SVN rev 241238 on 2012-10-05 22:42:57Z by eadler

MFC r241116:
	Correct the tip about finding all the directories on the system
	Add a tip about clearing the screen.
	Make things more consistent by removing quotes around 'make search'

Approved by:	cperciva (implicit)
@
text
@d275 2
a276 5
	find / -type d | less

All the files?

	find / -type f | less
d318 1
a318 1
	make search name=<port-name>
d320 1
a320 1
	make search key=<keyword>
a424 2
You can press Ctrl-L while in the shell to clear the screen.
%
@


1.47.2.6
log
@SVN rev 242110 on 2012-10-26 00:35:28Z by eadler

MFC r241845,r241934:
	Sysinstall has been removed from base.

MFC farther back to maintain consistency

Approved by:	cperciva (implicit)
@
text
@d43 1
a43 1
reinstall it with boot0cfg(8). See
@


1.47.2.7
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not).  Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ##       [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ##       [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by:	yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d2 1
a2 1
$FreeBSD: stable/8/games/fortune/datfiles/freebsd-tips 242110 2012-10-26 00:35:28Z eadler $
@


1.47.2.8
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/249829
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d2 1
a2 1
$FreeBSD: stable/8/games/fortune/datfiles/freebsd-tips 249829 2013-04-24 04:21:23Z eadler $
d376 10
@


1.47.2.3.2.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith

Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.47.2.3.2.2
log
@Switch importer
@
text
@d2 1
a2 1
$FreeBSD: releng/8.3/games/fortune/datfiles/freebsd-tips 223547 2011-06-25 22:22:25Z dougb $
@


1.47.2.2.4.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)
@
text
@@


1.47.2.2.2.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)
@
text
@@


1.47.2.1.2.1
log
@SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)
@
text
@@


1.46
log
@SVN rev 179459 on 2008-05-31 18:07:16Z by remko

Remove a quote about the instant-workstation, this port
has been removed ages ago.

PR:		docs/124166
Submitted by:	keramida
Prodded by:	novel,keramida
@
text
@d218 2
a219 2
ports/net/netcat port is useful not only for redirecting input/output
to TCP or UDP connections, but also for proxying them with inetd(8).
@


1.45
log
@The ../tools/do_sort script could not differentiate between
a few very slightly diffrent versions of tcsh prompts, so
restore the 2 that were lost, and consolidate them all in
a way that will prevent them from being lost again.
@
text
@a404 10
You can get a good standard workstation install by using the
instant-workstation port/package.  If you have ports installed, you can
install it by doing

	# cd /usr/ports/misc/instant-workstation
	# make install && make clean

as root.  This will install a collection of packages that is convenient to
have on a workstation.
%
@


1.44
log
@Sort these files using: sh ../tools/do_sort < $file > $file.sorted

This greatly aids in detecting duplicates, among other things.
@
text
@d207 6
a212 5
Nice tcsh prompt: set prompt = '[%B%m%b] %B%~%b%# '
%
Nice tcsh prompt: set prompt = '%m %# '
%
Nice tcsh prompt: set prompt = '%n@@%m%# '
@


1.43
log
@This is a massive cleanup of the fortune files, including removal
of many duplicates, formatting/whitespace fixes, spelling fixes,
and a host of others. Note: No fortunes were intentionally removed
(other than duplicates) as part of this cleanup. In removing dupes
I tried to be generous in not removing similarly worded fortunes
that had even slightly different punch lines.

Duplicates were resolved as follows (in this order):
* + limerick		-> limerick
* + fortunes-o.real	-> fortunes-o.real
* + fortunes2-o		-> fortunes2-o
* + zippy		-> zippy
murphy + fortunes	-> fortunes

In correcting spelling I've tried to leave colloquial variations
(especially British'isms) intact, as well as to not "correct"
errors that are part of the joke.

In fortunes and fortunes2-o I combined a couple of fortunes that
were adjacent to each other that seemed like they should have
originally been combined, and split a couple that seemed like they
should have originally been split.

Miscellaneous:
1. Fixed underlining
2. Capitalized proper names
3. Removed quotation marks from "freestanding" quotes for consistency
4. Added quotation marks to QOTD fortunes that needed them
5. Corrected or added many attributions
6. Removed apostrophes from trailing 's' that are plural, not possessive
7. Updated the path to fortune stuff included in some of the jokes
8. Updated several fortunes to their original version, and added attribution
9. Split up compound words that ispell tripped over
@
text
@d4 3
a6 2
Having trouble using fetch through a firewall? Try setting the environment
variable FTP_PASSIVE_MODE to yes, and see fetch(3) for more details.
d11 2
a12 2
Want colour in your directory listings?  Use "ls -G".  "ls -F" is also useful,
and they can be combined as "ls -FG".
d14 3
a16 6
If you need to ask a question on the FreeBSD-questions mailing list then

	http://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/\
		freebsd-questions/index.html

contains lots of useful advice to help you get the best results.
d18 1
a18 2
If you'd like to keep track of applications in the FreeBSD ports tree, take a
look at FreshPorts;
d20 2
a21 1
	http://www.freshports.org/
d23 2
a24 6
To search for files that match a particular name, use find(1); for example

	find / -name "*GENERIC*" -ls

will search '/', and all subdirectories, for files with 'GENERIC' in the name.
      	--  Stephen Hilton <nospam@@hiltonbsd.com>
d26 3
a28 2
In tcsh, you can `set autolist' to have the shell automatically show
all the possible matches when doing filename/directory expansion.
d30 5
a34 2
You can `set autologout = 30' to have tcsh log you off automatically
if you leave the shell idle for more than 30 minutes.
d36 2
a37 3
If you `set filec' (file completion) in tcsh and write a part of the
filename, pressing TAB will show you the available choices when there
is more than one, or complete the filename if there's only one match.
d39 2
a40 2
You can press up-arrow or down-arrow to walk through a list of
previous commands in tcsh.
d42 3
a44 1
You can disable tcsh's terminal beep if you `set nobeep'.
d46 2
a47 2
If you `set watch = (0 any any)' in tcsh, you will be notified when
someone logs in or out of your system.
d49 3
a51 59
Nice tcsh prompt: set prompt = '%m %# '
%
Nice tcsh prompt: set prompt = '%n@@%m%# '
%
Nice tcsh prompt: set prompt = '%n@@%m:%~%# '
%
Nice tcsh prompt: set prompt = '%n@@%m:%/%# '
%
Nice tcsh prompt: set prompt = '[%B%m%b] %B%~%b%# '
%
Simple tcsh prompt: set prompt = '%# '
%
If you want df(1) and other commands to display disk sizes in
kilobytes instead of 512-byte blocks, set BLOCKSIZE in your
environment to 'K'.  You can also use 'M' for Megabytes or 'G' for
Gigabytes.  If you want df(1) to automatically select the best size
then use 'df -h'.
%
To change an environment variable in tcsh you use: setenv NAME "value"
where NAME is the name of the variable and "value" its new value.
%
To change an environment variable in /bin/sh use:

	$ VARIABLE="value"
	$ export VARIABLE
%
You can use /etc/make.conf to control the options used to compile software
on this system.  Example entries are in
/usr/share/examples/etc/make.conf.
%
To do a fast search for a file, try

	 locate filename

locate uses a database that is updated every Saturday (assuming your computer
is running FreeBSD at the time) to quickly find files based on name only.
%
In order to search for a string in some files, use 'grep' like this:

	 grep "string" filename1 [filename2 filename3 ...]

This will print out the lines in the files that contain the string.  grep can
also do a lot more advanced searches - type 'man grep' for details.
%
You can use the 'fetch' command to retrieve files over ftp or http.

	 fetch http://www.FreeBSD.org/index.html

will download the front page of the FreeBSD web site.
%
In order to make fetch (the FreeBSD downloading tool) ask for
username/password when it encounters a password-protected web page, you can set
the environment variable HTTP_AUTH to 'basic:*'.
%
You can permanently set environment variables for your shell by putting them
in a startup file for the shell.  The name of the startup file varies
depending on the shell - csh and tcsh uses .login, bash, sh, ksh and zsh use
.profile.  When using bash, sh, ksh or zsh, don't forget to export the
variable.
d69 5
a73 1
You can look through a file in a nice text-based interface by typing
d75 1
a75 1
	less filename
d77 3
a79 3
The default editor in FreeBSD is vi, which is efficient to use when you have
learned it, but somewhat user-unfriendly.  To use ee (an easier but less
powerful editor) instead, set the environment variable EDITOR to /usr/bin/ee
d81 1
a81 6
If you accidentally end up inside vi, you can quit it by pressing Escape, colon
(:), q (q), bang (!) and pressing return.
%
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):
d83 2
a84 3
	alias lf="ls -FA"
	alias ll="ls -lA"
	alias su="su -m"
d86 1
a86 8
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'.  To list all
aliases, you can usually type just 'alias'.
d88 3
a90 3
In order to support national characters for European languages in tools like
less without creating other nationalisation aspects, set the environment
variable LC_ALL to 'en_US.ISO8859-1'.
d92 2
a93 3
You can search for documentation on a keyword by typing

	apropos keyword
d95 2
a96 3
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).
You can get an introduction to each topic by typing
d98 2
a99 5
	man <number> intro

In other words, to get the intro to general commands, type

	man 1 intro
d101 5
a105 5
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.
d111 2
a112 5
If you have a CD-ROM drive in your machine, you can make the CD-ROM that is
presently inserted available by typing 'mount /cdrom' as root.  The CD-ROM
will be available under /cdrom/.  Remember to do 'umount /cdrom' before
removing the CD-ROM (it will usually not be possible to remove the CD-ROM
without doing this.)
d114 2
a115 1
Note: This tip may not work in all configurations.
d117 2
a118 3
You can install extra packages for FreeBSD by using the ports system.
If you have installed it, you can download, compile, and install software by
just typing
d120 7
a126 2
	# cd /usr/ports/<category>/<portname>
	# make install && make clean
d128 1
a128 5
as root.  The ports infrastructure will download the software, change it so
it works on FreeBSD, compile it, install it, register the installation so it
will be possible to automatically uninstall it, and clean out the temporary
working space it used.  You can remove an installed port you decide you do not
want after all by typing
d130 2
a131 4
	# cd /usr/ports/<category>/<portname>
	# make deinstall

as root.
d133 3
a135 2
Nice bash prompt: PS1='(\[$(tput md)\]\t <\w>\[$(tput me)\]) $(echo $?) \$ '
		-- Mathieu <mathieu@@hal.interactionvirtuelle.com>
d137 2
a138 3
To see the output from when your computer started, run dmesg(8).  If it has
been replaced with other messages, look at /var/run/dmesg.boot.
		-- Francisco Reyes <lists@@natserv.com>
d140 2
a141 6
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 netscape" and "whereis whereis".
		-- Konstantinos Konstantinidis <kkonstan@@duth.gr>
d143 2
a144 3
You can press Ctrl-D to quickly exit from a shell, or logout from a
login shell.
		-- Konstantinos Konstantinidis <kkonstan@@duth.gr>
d146 5
a150 5
You can use "pkg_info" to see a list of packages you have installed.
		-- Konstantinos Konstantinidis <kkonstan@@duth.gr>
%
You can change the video mode on all consoles by adding something like
the following to /etc/rc.conf:
d152 1
a152 1
	allscreens="80x30"
d154 1
a154 3
You can use "vidcontrol -i mode | grep T" for a list of supported text
modes.
		-- Konstantinos Konstantinidis <kkonstan@@duth.gr>
d156 1
a156 3
Any user that is a member of the wheel group can use "su -" to simulate
a root login. You can add a user to the wheel group by editing /etc/group.
		-- Konstantinos Konstantinidis <kkonstan@@duth.gr>
d158 2
a159 3
Over quota?  "du -s * | sort -n " will give you a sorted list of your
directory sizes.
		-- David Scheidt <dscheidt@@tumbolia.com>
d161 1
a161 1
Handy bash(1) prompt:  PS1="\u@@\h \w \!$ "
d164 3
a166 3
Ever wonder what those numbers after command names were, as in cat(1)?  It's
the section of the manual the man page is in.  "man man" will tell you more.
		-- David Scheidt <dscheidt@@tumbolia.com>
d168 2
a169 2
"man hier" will explain the way FreeBSD filesystems are normally laid out.
		-- David Scheidt <dscheidt@@tumbolia.com>
d171 4
a174 2
"man tuning" gives some tips how to tune performance of your FreeBSD system.
		-- David Scheidt <dscheidt@@tumbolia.com>
d176 4
a179 2
"man firewall" will give advice for building a FreeBSD firewall
		-- David Scheidt <dscheidt@@tumbolia.com>
d181 2
a182 4
You can often get answers to your questions about FreeBSD by searching in the
FreeBSD mailing list archives at

	http://www.FreeBSD.org/search/search.html
d184 2
a185 3
You can adjust the volume of various parts of the sound system in your
computer by typing 'mixer <type> <volume>'.  To get a list of what you can
adjust, just type 'mixer'.
d187 1
a187 1
You can automatically download and install binary packages by doing
d189 6
a194 5
	pkg_add -r <URL>

where you replace <URL> with the URL to the package.  This will also
automatically install the packages the package you download is dependent on
(ie, the packages it needs in order to work.)
d196 3
a198 9
You can get a good standard workstation install by using the
instant-workstation port/package.  If you have ports installed, you can
install it by doing

	# cd /usr/ports/misc/instant-workstation
	# make install && make clean

as root.  This will install a collection of packages that is convenient to
have on a workstation.
d200 3
a202 9
You can get a good generic server install by using the
instant-server port/package.  If you have ports installed, you can
install it by doing

	# cd /usr/ports/misc/instant-server
	# make install && make clean

as root.  This will install a collection of packages that is appropriate for
running a "generic" server.
d204 2
a205 1
You can make a log of your terminal session with script(1).
d207 1
a207 1
"man ports" gives many useful hints about installing FreeBSD ports.
d209 1
a209 2
"man security" gives very good advice on how to tune the security of your
FreeBSD system.
d211 1
a211 6
Want to find a specific port, just type the following under /usr/ports,
or one its subdirectories:

	"make search name=<port-name>"
    or
	"make search key=<keyword>"
d213 3
a215 2
Want to see how much virtual memory you're using? Just type "swapinfo" to
be shown information about the usage of your swap partitions.
d220 8
a227 3
If other operating systems have damaged your Master Boot Record, you can
reinstall it either with /usr/sbin/sysinstall or with boot0cfg(8). See
"man boot0cfg" for details.
d229 1
a229 2
Need to see the calendar for this month? Simply type "cal".  To see the
whole year, type "cal -y".
d232 4
a235 2
Need to quickly return to your home directory? Type "cd".
		-- Dru <genesis@@istar.ca>
d237 2
a238 2
To see the last time that you logged in, use lastlogin(8).
		-- Dru <genesis@@istar.ca>
a244 18
To save disk space in your home directory, compress files you rarely
use with "gzip filename".
		-- Dru <genesis@@istar.ca>
%
To read a compressed file without having to first uncompress it, use
"zcat" or "zmore" to view it.
		-- Dru <genesis@@istar.ca>
%
To see how much disk space is left on your partitions, use

	df -h
		-- Dru <genesis@@istar.ca>
%
To see the 10 largest files on a directory or partition, use

	du /partition_or_directory_name | sort -rn | head
		-- Dru <genesis@@istar.ca>
%
d251 6
a256 2
Time to change your password? Type "passwd" and follow the prompts.
		-- Dru <genesis@@istar.ca>
d258 1
a258 2
Want to know how many words, lines, or bytes are contained in a file? Type
"wc filename".
d261 1
a261 1
Need to print a manpage? Use
d263 1
a263 1
	man name_of_manpage | col -bx | lpr
d266 2
a267 1
Need to remove all those ^M characters from a DOS file? Try
d269 3
a271 2
	tr -d \\r < dosfile > newfile
		-- Originally by Dru <genesis@@istar.ca>
d273 1
a273 1
Forget what directory you are in? Type "pwd".
d276 2
a277 2
If you are in the C shell and have just installed a new program, you won't
be able to run it unless you first type "rehash".
d280 1
a280 3
Need to leave your terminal for a few minutes and don't want to logout?
Use "lock -p". When you return, use your password as the key to unlock the
terminal.
d283 2
a284 1
Need to find the location of a program? Use "locate program_name".
d287 3
a289 1
Forget how to spell a word or a variation of a word? Use
d291 2
a292 2
	look portion_of_word_you_know
		-- Dru <genesis@@istar.ca>
d294 3
a296 2
To see the last 10 lines of a long file, use "tail filename". To see the
first 10 lines, use "head filename".
d303 1
a303 4
To quickly create an empty file, use "touch filename".
		-- Dru <genesis@@istar.ca>
%
To find out the hostname associated with an IP address, use
d305 1
a305 1
	dig -x IP_address
d308 1
a308 2
If you use the C shell, add the following line to the .cshrc file in your
home directory to prevent core files from being written to disk:
d310 1
a310 1
	limit coredumpsize 0
d313 2
a314 2
If you need a reminder to leave your terminal, type "leave +hhmm" where
"hhmm" represents in how many hours and minutes you need to leave.
d317 2
a318 2
Need to do a search in a manpage or in a file you've sent to a pager? Use
"/search_word". To repeat the same search, type "n" for next.
d321 1
a321 2
Forget when Easter is? Try "ncal -e". If you need the date for Orthodox
Easter, use "ncal -o" instead.
d324 3
a326 2
Need to see your routing table? Type "netstat -rn". The entry with the G
flag is your gateway.
d329 3
a331 3
Need to see which daemons are listening for connection requests? Use
"sockstat -4l" for IPv4, and "sockstat -l" for IPv4 and IPv6.
		-- Dru <genesis@@istar.ca>
d333 2
a334 2
Can't remember if you've installed a certain port or not? Try "pkg_info
-Ix port_name".
d336 6
a341 2
To erase a line you've written at the command prompt, use "Ctrl-U".
		-- Dru <genesis@@istar.ca>
d343 2
a344 1
To repeat the last command in the C shell, type "!!".
d347 2
a348 2
Need to quickly empty a file? Use ": > filename".
		-- Dru <genesis@@istar.ca>
d350 1
a350 1
To see all of the directories on your FreeBSD system, type
d352 1
a352 2
	ls -R / | more
		-- Dru <genesis@@istar.ca>
d354 7
a360 5
To see the IP addresses currently set on your active interfaces, type
"ifconfig -u".
		-- Dru <genesis@@istar.ca>
%
To see the MAC addresses of the NICs on your system, type
d362 1
a362 8
	ifconfig -a
		-- Dru <genesis@@istar.ca>
%
You can open up a new split-screen window in (n)vi with :N or :E and then
use ^w to switch between the two.
%
sh (the default Bourne shell in FreeBSD) supports command-line editing.  Just
``set -o emacs'' or ``set -o vi'' to enable it.
d371 89
a459 2
If you want to quickly check for duplicate package/port installations,
try the following pkg_info command.
d461 4
a464 2
	pkg_info | sort | sed -e 's/-[0-9].*$//' | \
	uniq -c | grep -v '^[[:space:]]*1'
d466 7
a472 2
Want to use sed(1) to edit a file in place?  Well, to replace every 'e' with
an 'o', in a file named 'foo', you can do:
d474 1
a474 1
	sed -i.bak s/e/o/g foo
d476 3
a478 2
And you'll get a backup of the original in a file named 'foo.bak', but if you
want no backup:
d480 9
a488 1
	sed -i '' s/e/o/g foo
d490 3
a492 2
To obtain a neat PostScript rendering of a manual page, use ``-t'' switch
of the man(1) utility: ``man -t <topic>''.  For example:
d494 1
a494 3
	man -t grep > grep.ps	# Save the PostScript version to a file
or
	man -t printf | lp	# Send the PostScript directly to printer
d496 3
a498 1
Want to strip UTF-8 BOM(Byte Order Mark) from given files?
d500 2
a501 1
	sed -e '1s/^\xef\xbb\xbf//' < bomfile > newfile
@


1.42
log
@o /stand/sysinstall -> /usr/sbin/sysinstall.

PR:		conf/106254
Submitted by:	Simon Olofsson
MFC after:	1 week
@
text
@d15 1
a15 1
	http://www.freebsd.org/doc/en_US.ISO8859-1/articles/\
d96 1
a96 1
	 fetch http://www.freebsd.org/index.html
d134 1
a134 1
If you accidentally end up inside vi, you can quit it by pressing Escape, colon 
d183 1
a183 1
presently inserted available by typing 'mount /cdrom' as root.   The CD-ROM
d197 1
a197 1
as root.   The ports infrastructure will download the software, change it so
d246 1
a246 1
Handy bash(1) prompt:   PS1="\u@@\h \w \!$ "
d265 1
a265 1
	http://www.freebsd.org/search/search.html
d441 1
a441 1
Can't remember if you've installed a certain port or not? Try "pkg_info 
d506 1
@


1.42.2.1
log
@MFC all updates to date, including the merger of the fortunes-o.real
and fortunes2-o files, and the relevant ObsoleteFiles.inc entry.

Approved by:	re (kensmith)
@
text
@d4 2
a5 3
Any user that is a member of the wheel group can use "su -" to simulate
a root login. You can add a user to the wheel group by editing /etc/group.
		-- Konstantinos Konstantinidis <kkonstan@@duth.gr>
d10 9
a18 2
Can't remember if you've installed a certain port or not? Try "pkg_info
-Ix port_name".
d20 4
a23 3
Ever wonder what those numbers after command names were, as in cat(1)?  It's
the section of the manual the man page is in.  "man man" will tell you more.
		-- David Scheidt <dscheidt@@tumbolia.com>
d25 3
a27 1
Forget how to spell a word or a variation of a word? Use
d29 38
a66 2
	look portion_of_word_you_know
		-- Dru <genesis@@istar.ca>
d68 2
a69 2
Forget what directory you are in? Type "pwd".
		-- Dru <genesis@@istar.ca>
d71 4
a74 3
Forget when Easter is? Try "ncal -e". If you need the date for Orthodox
Easter, use "ncal -o" instead.
		-- Dru <genesis@@istar.ca>
d76 3
a78 5
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.
d80 6
a85 2
Handy bash(1) prompt:  PS1="\u@@\h \w \!$ "
		-- David Scheidt <dscheidt@@tumbolia.com>
d87 6
a92 2
Having trouble using fetch through a firewall? Try setting the environment
variable FTP_PASSIVE_MODE to yes, and see fetch(3) for more details.
d94 5
a98 3
If other operating systems have damaged your Master Boot Record, you can
reinstall it either with /usr/sbin/sysinstall or with boot0cfg(8). See
"man boot0cfg" for details.
d100 3
a102 2
If you accidentally end up inside vi, you can quit it by pressing Escape, colon
(:), q (q), bang (!) and pressing return.
d104 5
a108 3
If you are in the C shell and have just installed a new program, you won't
be able to run it unless you first type "rehash".
		-- Dru <genesis@@istar.ca>
d126 1
a126 5
If you have a CD-ROM drive in your machine, you can make the CD-ROM that is
presently inserted available by typing 'mount /cdrom' as root.  The CD-ROM
will be available under /cdrom/.  Remember to do 'umount /cdrom' before
removing the CD-ROM (it will usually not be possible to remove the CD-ROM
without doing this.)
d128 5
a132 1
Note: This tip may not work in all configurations.
d134 2
a135 3
If you need a reminder to leave your terminal, type "leave +hhmm" where
"hhmm" represents in how many hours and minutes you need to leave.
		-- Dru <genesis@@istar.ca>
d137 9
a145 1
If you need to ask a question on the FreeBSD-questions mailing list then
d147 3
a149 2
	http://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/\
		freebsd-questions/index.html
d151 2
a152 1
contains lots of useful advice to help you get the best results.
d154 3
a156 3
If you `set filec' (file completion) in tcsh and write a part of the
filename, pressing TAB will show you the available choices when there
is more than one, or complete the filename if there's only one match.
d158 3
a160 2
If you `set watch = (0 any any)' in tcsh, you will be notified when
someone logs in or out of your system.
d162 7
a168 2
If you use the C shell, add the following line to the .cshrc file in your
home directory to prevent core files from being written to disk:
d170 1
a170 2
	limit coredumpsize 0
		-- Dru <genesis@@istar.ca>
d172 5
a176 5
If you want df(1) and other commands to display disk sizes in
kilobytes instead of 512-byte blocks, set BLOCKSIZE in your
environment to 'K'.  You can also use 'M' for Megabytes or 'G' for
Gigabytes.  If you want df(1) to automatically select the best size
then use 'df -h'.
d182 23
a204 2
If you want to quickly check for duplicate package/port installations,
try the following pkg_info command.
d206 8
a213 2
	pkg_info | sort | sed -e 's/-[0-9].*$//' | \
	uniq -c | grep -v '^[[:space:]]*1'
d215 3
a217 2
If you'd like to keep track of applications in the FreeBSD ports tree, take a
look at FreshPorts;
d219 6
a224 1
	http://www.freshports.org/
d226 2
a227 3
In order to make fetch (the FreeBSD downloading tool) ask for
username/password when it encounters a password-protected web page, you can set
the environment variable HTTP_AUTH to 'basic:*'.
d229 2
a230 1
In order to search for a string in some files, use 'grep' like this:
d232 1
a232 1
	 grep "string" filename1 [filename2 filename3 ...]
d234 7
a240 2
This will print out the lines in the files that contain the string.  grep can
also do a lot more advanced searches - type 'man grep' for details.
d242 3
a244 3
In order to support national characters for European languages in tools like
less without creating other nationalisation aspects, set the environment
variable LC_ALL to 'en_US.ISO8859-1'.
d246 2
a247 2
In tcsh, you can `set autolist' to have the shell automatically show
all the possible matches when doing filename/directory expansion.
d249 2
a250 1
"man firewall" will give advice for building a FreeBSD firewall
d256 29
a284 3
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).
You can get an introduction to each topic by typing
d286 6
a291 1
	man <number> intro
d293 2
a294 1
In other words, to get the intro to general commands, type
d296 4
a299 1
	man 1 intro
d306 6
a311 2
"man tuning" gives some tips how to tune performance of your FreeBSD system.
		-- David Scheidt <dscheidt@@tumbolia.com>
d313 2
a314 3
Need to do a search in a manpage or in a file you've sent to a pager? Use
"/search_word". To repeat the same search, type "n" for next.
		-- Dru <genesis@@istar.ca>
d316 2
a317 2
Need to find the location of a program? Use "locate program_name".
		-- Dru <genesis@@istar.ca>
d319 3
a321 4
Need to leave your terminal for a few minutes and don't want to logout?
Use "lock -p". When you return, use your password as the key to unlock the
terminal.
		-- Dru <genesis@@istar.ca>
d323 2
a324 3
Need to print a manpage? Use

	man name_of_manpage | col -bx | lpr
d327 1
a327 1
Need to quickly empty a file? Use ": > filename".
d330 1
a330 1
Need to quickly return to your home directory? Type "cd".
d333 3
a335 7
Need to remove all those ^M characters from a DOS file? Try

	tr -d \\r < dosfile > newfile
		-- Originally by Dru <genesis@@istar.ca>
%
Need to see the calendar for this month? Simply type "cal".  To see the
whole year, type "cal -y".
d338 2
a339 2
Need to see which daemons are listening for connection requests? Use
"sockstat -4l" for IPv4, and "sockstat -l" for IPv4 and IPv6.
d342 2
a343 2
Need to see your routing table? Type "netstat -rn". The entry with the G
flag is your gateway.
d346 3
a348 27
Nice bash prompt: PS1='(\[$(tput md)\]\t <\w>\[$(tput me)\]) $(echo $?) \$ '
		-- Mathieu <mathieu@@hal.interactionvirtuelle.com>
%
Nice tcsh prompts:
	set prompt = '[%B%m%b] %B%~%b%# '
	set prompt = '%m %# '
	set prompt = '%n@@%m%# '
	set prompt = '%n@@%m:%/%# '
	set prompt = '%n@@%m:%~%# '
%
Over quota?  "du -s * | sort -n " will give you a sorted list of your
directory sizes.
		-- David Scheidt <dscheidt@@tumbolia.com>
%
ports/net/netcat port is useful not only for redirecting input/output
to TCP or UDP connections, but also for proxying them with inetd(8).
%
sh (the default Bourne shell in FreeBSD) supports command-line editing.  Just
``set -o emacs'' or ``set -o vi'' to enable it.
%
Simple tcsh prompt: set prompt = '%# '
%
The default editor in FreeBSD is vi, which is efficient to use when you have
learned it, but somewhat user-unfriendly.  To use ee (an easier but less
powerful editor) instead, set the environment variable EDITOR to /usr/bin/ee
%
Time to change your password? Type "passwd" and follow the prompts.
d351 1
a351 1
To change an environment variable in /bin/sh use:
d353 1
a353 9
	$ VARIABLE="value"
	$ export VARIABLE
%
To change an environment variable in tcsh you use: setenv NAME "value"
where NAME is the name of the variable and "value" its new value.
%
To clear the screen, use "clear". To re-display your screen buffer, press
the scroll lock key and use your page up button. When you're finished,
press the scroll lock key again to get your prompt back.
d362 2
a363 6
To do a fast search for a file, try

	 locate filename

locate uses a database that is updated every Saturday (assuming your computer
is running FreeBSD at the time) to quickly find files based on name only.
d365 2
a366 1
To erase a line you've written at the command prompt, use "Ctrl-U".
d369 1
a369 1
To find out the hostname associated with an IP address, use
d371 1
a371 1
	dig -x IP_address
d374 1
a374 2
To obtain a neat PostScript rendering of a manual page, use ``-t'' switch
of the man(1) utility: ``man -t <topic>''.  For example:
d376 2
a377 3
	man -t grep > grep.ps	# Save the PostScript version to a file
or
	man -t printf | lp	# Send the PostScript directly to printer
d379 1
a379 1
To quickly create an empty file, use "touch filename".
d382 2
a383 2
To read a compressed file without having to first uncompress it, use
"zcat" or "zmore" to view it.
d386 3
a388 1
To repeat the last command in the C shell, type "!!".
d391 1
a391 2
To save disk space in your home directory, compress files you rarely
use with "gzip filename".
d394 1
a394 1
To search for files that match a particular name, use find(1); for example
d396 2
a397 4
	find / -name "*GENERIC*" -ls

will search '/', and all subdirectories, for files with 'GENERIC' in the name.
      	--  Stephen Hilton <nospam@@hiltonbsd.com>
d399 2
a400 3
To see all of the directories on your FreeBSD system, type

	ls -R / | more
d407 4
a410 1
To see how much disk space is left on your partitions, use
d412 1
a412 1
	df -h
d415 2
a416 1
To see the 10 largest files on a directory or partition, use
d418 1
a418 1
	du /partition_or_directory_name | sort -rn | head
d421 2
a422 2
To see the IP addresses currently set on your active interfaces, type
"ifconfig -u".
d425 2
a426 2
To see the last 10 lines of a long file, use "tail filename". To see the
first 10 lines, use "head filename".
d429 2
a430 1
To see the last time that you logged in, use lastlogin(8).
d433 2
a434 3
To see the MAC addresses of the NICs on your system, type

	ifconfig -a
d437 3
a439 3
To see the output from when your computer started, run dmesg(8).  If it has
been replaced with other messages, look at /var/run/dmesg.boot.
		-- Francisco Reyes <lists@@natserv.com>
d441 2
a442 2
Want colour in your directory listings?  Use "ls -G".  "ls -F" is also useful,
and they can be combined as "ls -FG".
d444 2
a445 6
Want to find a specific port, just type the following under /usr/ports,
or one its subdirectories:

	"make search name=<port-name>"
    or
	"make search key=<keyword>"
d447 1
a447 2
Want to know how many words, lines, or bytes are contained in a file? Type
"wc filename".
d450 2
a451 2
Want to see how much virtual memory you're using? Just type "swapinfo" to
be shown information about the usage of your swap partitions.
d453 1
a453 1
Want to strip UTF-8 BOM(Byte Order Mark) from given files?
d455 6
a460 1
	sed -e '1s/^\xef\xbb\xbf//' < bomfile > newfile
d462 1
a462 2
Want to use sed(1) to edit a file in place?  Well, to replace every 'e' with
an 'o', in a file named 'foo', you can do:
d464 8
a471 6
	sed -i.bak s/e/o/g foo

And you'll get a backup of the original in a file named 'foo.bak', but if you
want no backup:

	sed -i '' s/e/o/g foo
d480 2
a481 5
You can adjust the volume of various parts of the sound system in your
computer by typing 'mixer <type> <volume>'.  To get a list of what you can
adjust, just type 'mixer'.
%
You can automatically download and install binary packages by doing
d483 2
a484 5
	pkg_add -r <URL>

where you replace <URL> with the URL to the package.  This will also
automatically install the packages the package you download is dependent on
(ie, the packages it needs in order to work.)
d486 2
a487 2
You can change the video mode on all consoles by adding something like
the following to /etc/rc.conf:
d489 1
a489 1
	allscreens="80x30"
d491 2
a492 9
You can use "vidcontrol -i mode | grep T" for a list of supported text
modes.
		-- Konstantinos Konstantinidis <kkonstan@@duth.gr>
%
You can disable tcsh's terminal beep if you `set nobeep'.
%
You can get a good generic server install by using the
instant-server port/package.  If you have ports installed, you can
install it by doing
d494 1
a494 5
	# cd /usr/ports/misc/instant-server
	# make install && make clean

as root.  This will install a collection of packages that is appropriate for
running a "generic" server.
d496 2
a497 3
You can get a good standard workstation install by using the
instant-workstation port/package.  If you have ports installed, you can
install it by doing
d499 3
a501 5
	# cd /usr/ports/misc/instant-workstation
	# make install && make clean

as root.  This will install a collection of packages that is convenient to
have on a workstation.
d503 1
a503 3
You can install extra packages for FreeBSD by using the ports system.
If you have installed it, you can download, compile, and install software by
just typing
d505 1
a505 85
	# cd /usr/ports/<category>/<portname>
	# make install && make clean

as root.  The ports infrastructure will download the software, change it so
it works on FreeBSD, compile it, install it, register the installation so it
will be possible to automatically uninstall it, and clean out the temporary
working space it used.  You can remove an installed port you decide you do not
want after all by typing

	# cd /usr/ports/<category>/<portname>
	# make deinstall

as root.
%
You can look through a file in a nice text-based interface by typing

	less filename
%
You can make a log of your terminal session with script(1).
%
You can often get answers to your questions about FreeBSD by searching in the
FreeBSD mailing list archives at

	http://www.FreeBSD.org/search/search.html
%
You can open up a new split-screen window in (n)vi with :N or :E and then
use ^w to switch between the two.
%
You can permanently set environment variables for your shell by putting them
in a startup file for the shell.  The name of the startup file varies
depending on the shell - csh and tcsh uses .login, bash, sh, ksh and zsh use
.profile.  When using bash, sh, ksh or zsh, don't forget to export the
variable.
%
You can press Ctrl-D to quickly exit from a shell, or logout from a
login shell.
		-- Konstantinos Konstantinidis <kkonstan@@duth.gr>
%
You can press up-arrow or down-arrow to walk through a list of
previous commands in tcsh.
%
You can search for documentation on a keyword by typing

	apropos keyword
%
You can `set autologout = 30' to have tcsh log you off automatically
if you leave the shell idle for more than 30 minutes.
%
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'.  To list all
aliases, you can usually type just 'alias'.
%
You can use /etc/make.conf to control the options used to compile software
on this system.  Example entries are in
/usr/share/examples/etc/make.conf.
%
You can use "pkg_info" to see a list of packages you have installed.
		-- Konstantinos Konstantinidis <kkonstan@@duth.gr>
%
You can use the 'fetch' command to retrieve files over ftp or http.

	 fetch http://www.FreeBSD.org/index.html

will download the front page of the FreeBSD web site.
%
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 netscape" and "whereis whereis".
		-- Konstantinos Konstantinidis <kkonstan@@duth.gr>
%
@


1.42.2.2
log
@SVN rev 193493 on 2009-06-05 11:55:32Z by edwin

MFC of r179459 and r187110:

Remove a quote about the instant-workstation, this port
has been removed ages ago.

netcat is "now" in base, so point people at nc(1) instead of the port.

PR:		docs/124166
@
text
@d218 2
a219 2
nc(1) (or netcat) is useful not only for redirecting input/output to
TCP or UDP connections, but also for proxying them with inetd(8).
d405 10
@


1.42.2.3
log
@SVN rev 204260 on 2010-02-23 21:15:05Z by gavin

Merge r202115 from head:

  Our standard "xterm" termcap entry supports colour, so this tip is redundant.
  As it happens, "xterm-color" has just been an alias for "xterm" since
  src/share/termcap/termcap.src 1.131 in September 2002.

PR:		docs/132959
@
text
@d53 12
@


1.42.2.4
log
@SVN rev 223548 on 2011-06-25 22:36:41Z by dougb

MFC r211094:
  "whereis netscape" gives empty output for quite a long time already.
  Suggest to use "whereis firefox" instead.

MFC r212168:
  fix the move so that it matches what the rest of the internet
  says about this game...  This move also makes more sense...

MFC r213287
  Add advice to new fathers from Thomas Ptacek.

MFC r221908
  fortune(6): fix typos and misspellings.

  While here, drop words in the spelling files that are no longer used
  anywhere.

  Speling errors found via:	codespell from Lucas De Marchi

MFC r221909
  Convert a file to UTF-8. This only changes a character in the
  copyright section and will not require UTF-8 for fortune(6).

MFC r222890
  Minor typo, fix 2 attributions
@
text
@d479 1
a479 1
Try "whereis firefox" and "whereis whereis".
@


1.42.2.5
log
@SVN rev 235384 on 2012-05-13 01:30:27Z by eadler

MFC r235209 r235227:
	Add a few new tips and update some old ones to more modern commands

Approved by:	cperciva (implicit)
@
text
@d76 2
a77 2
If you write part of a filename in tcsh,
pressing TAB will show you the available choices when there
d125 3
d195 7
d266 1
a266 1
"zcat" or "zless" to view it.
d285 1
a285 1
	ls -R / | less
d325 1
a325 1
Want to find a specific port, just type the following under /usr/ports
a481 6
Want to run the same command again?
In tcsh you can type "!!"
%
Want to go the directory you were just in?
Type "cd -"
%
@


1.42.2.6
log
@SVN rev 241239 on 2012-10-05 22:42:57Z by eadler

MFC r241116:
	Correct the tip about finding all the directories on the system
	Add a tip about clearing the screen.
	Make things more consistent by removing quotes around 'make search'

Approved by:	cperciva (implicit)
@
text
@d275 2
a276 5
	find / -type d | less

All the files?

	find / -type f | less
d318 1
a318 1
	make search name=<port-name>
d320 1
a320 1
	make search key=<keyword>
a424 2
You can press Ctrl-L while in the shell to clear the screen.
%
@


1.42.2.7
log
@SVN rev 242111 on 2012-10-26 00:35:30Z by eadler

MFC r241845,r241934:
	Sysinstall has been removed from base.

MFC farther back to maintain consistency

Approved by:	cperciva (implicit)
@
text
@d43 1
a43 1
reinstall it with boot0cfg(8). See
@


1.42.2.8
log
@Switch importer
@
text
@d2 1
a2 1
$FreeBSD: stable/7/games/fortune/datfiles/freebsd-tips 242111 2012-10-26 00:35:30Z eadler $
@


1.42.2.3.2.1
log
@SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)
@
text
@@


1.42.2.3.2.2
log
@Switch importer
@
text
@d2 1
a2 1
$FreeBSD: releng/7.4/games/fortune/datfiles/freebsd-tips 210491 2010-07-26 02:02:45Z dougb $
@


1.42.2.2.2.1
log
@SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)
@
text
@@


1.42.2.1.6.1
log
@SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)
@
text
@@


1.42.2.1.4.1
log
@SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)
@
text
@@


1.41
log
@Add a tip on "how to strip UTF-8 BOM"

Approved by:	delphij (mentor)
@
text
@d320 1
a320 1
reinstall it either with /stand/sysinstall or with boot0cfg(8). See
@


1.40
log
@Fix locations of some links.
Word smithing.

PR:		conf/81923
Submitted by:	Gavin Atkinson <gavin dot atkinson at ury.york.ac.uk>
@
text
@d502 4
@


1.39
log
@Typo.

PR:		conf/77178
Submitted by:	Andras Jako <jako.andras@@eik.bme.hu>
MFC after:	1 week
@
text
@d78 1
a78 1
/usr/share/examples/etc/defaults/make.conf.
d174 3
a176 3
run the shell script /etc/rc.  By reading /etc/rc, 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.
d215 1
a215 1
You can use "whereis" to locate standard binary, manual page and source
d265 1
a265 1
	http://www.freebsd.org/search.html
d317 1
a317 2
to TCP or UDP connections, but also for proxying them. See inetd(8) for
details.
@


1.39.2.1
log
@MFC rev. 1.42: /stand/sysinstall -> /usr/sbin/sysinstall.
@
text
@d321 1
a321 1
reinstall it either with /usr/sbin/sysinstall or with boot0cfg(8). See
@


1.39.2.2
log
@Bring all files up to date with HEAD, which includes:
1. Misc. typo fixes
2. Lots of duplicate removal in the limerick file
3. Some updates to freebsd-tips

And most recently:
MFC fortunes 1.242: The original version of "The Guy in the Glass" with
proper attribution. See also http://www.theguyintheglass.com/

MFC fortunes 1.243, fortunes-o.real 1.23, and limerick 1.12:
Fix a few small typos and remove a duplicate
@
text
@d78 1
a78 1
/usr/share/examples/etc/make.conf.
d174 3
a176 3
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.
d215 1
a215 1
You can use "whereis" to search standard binary, manual page and source
d265 1
a265 1
	http://www.freebsd.org/search/search.html
d317 2
a318 1
to TCP or UDP connections, but also for proxying them with inetd(8).
a502 4
%
Want to strip UTF-8 BOM(Byte Order Mark) from given files?

	sed -e '1s/^\xef\xbb\xbf//' < bomfile > newfile
@


1.39.2.2.2.1
log
@Merge from RELENG_6 all updates to date *except* for the combination
of the fortunes-o.real and fortunes2.o files.

Approved by:	re (kensmith)
@
text
@d4 2
a5 3
Any user that is a member of the wheel group can use "su -" to simulate
a root login. You can add a user to the wheel group by editing /etc/group.
		-- Konstantinos Konstantinidis <kkonstan@@duth.gr>
d10 9
a18 2
Can't remember if you've installed a certain port or not? Try "pkg_info
-Ix port_name".
d20 4
a23 3
Ever wonder what those numbers after command names were, as in cat(1)?  It's
the section of the manual the man page is in.  "man man" will tell you more.
		-- David Scheidt <dscheidt@@tumbolia.com>
d25 3
a27 1
Forget how to spell a word or a variation of a word? Use
d29 38
a66 2
	look portion_of_word_you_know
		-- Dru <genesis@@istar.ca>
d68 2
a69 2
Forget what directory you are in? Type "pwd".
		-- Dru <genesis@@istar.ca>
d71 4
a74 3
Forget when Easter is? Try "ncal -e". If you need the date for Orthodox
Easter, use "ncal -o" instead.
		-- Dru <genesis@@istar.ca>
d76 3
a78 5
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.
d80 6
a85 2
Handy bash(1) prompt:  PS1="\u@@\h \w \!$ "
		-- David Scheidt <dscheidt@@tumbolia.com>
d87 6
a92 2
Having trouble using fetch through a firewall? Try setting the environment
variable FTP_PASSIVE_MODE to yes, and see fetch(3) for more details.
d94 5
a98 3
If other operating systems have damaged your Master Boot Record, you can
reinstall it either with /usr/sbin/sysinstall or with boot0cfg(8). See
"man boot0cfg" for details.
d100 3
a102 2
If you accidentally end up inside vi, you can quit it by pressing Escape, colon
(:), q (q), bang (!) and pressing return.
d104 5
a108 3
If you are in the C shell and have just installed a new program, you won't
be able to run it unless you first type "rehash".
		-- Dru <genesis@@istar.ca>
d126 1
a126 5
If you have a CD-ROM drive in your machine, you can make the CD-ROM that is
presently inserted available by typing 'mount /cdrom' as root.  The CD-ROM
will be available under /cdrom/.  Remember to do 'umount /cdrom' before
removing the CD-ROM (it will usually not be possible to remove the CD-ROM
without doing this.)
d128 5
a132 1
Note: This tip may not work in all configurations.
d134 2
a135 3
If you need a reminder to leave your terminal, type "leave +hhmm" where
"hhmm" represents in how many hours and minutes you need to leave.
		-- Dru <genesis@@istar.ca>
d137 9
a145 1
If you need to ask a question on the FreeBSD-questions mailing list then
d147 3
a149 2
	http://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/\
		freebsd-questions/index.html
d151 2
a152 1
contains lots of useful advice to help you get the best results.
d154 3
a156 3
If you `set filec' (file completion) in tcsh and write a part of the
filename, pressing TAB will show you the available choices when there
is more than one, or complete the filename if there's only one match.
d158 3
a160 2
If you `set watch = (0 any any)' in tcsh, you will be notified when
someone logs in or out of your system.
d162 7
a168 2
If you use the C shell, add the following line to the .cshrc file in your
home directory to prevent core files from being written to disk:
d170 1
a170 2
	limit coredumpsize 0
		-- Dru <genesis@@istar.ca>
d172 5
a176 5
If you want df(1) and other commands to display disk sizes in
kilobytes instead of 512-byte blocks, set BLOCKSIZE in your
environment to 'K'.  You can also use 'M' for Megabytes or 'G' for
Gigabytes.  If you want df(1) to automatically select the best size
then use 'df -h'.
d182 23
a204 2
If you want to quickly check for duplicate package/port installations,
try the following pkg_info command.
d206 8
a213 2
	pkg_info | sort | sed -e 's/-[0-9].*$//' | \
	uniq -c | grep -v '^[[:space:]]*1'
d215 3
a217 2
If you'd like to keep track of applications in the FreeBSD ports tree, take a
look at FreshPorts;
d219 6
a224 1
	http://www.freshports.org/
d226 2
a227 3
In order to make fetch (the FreeBSD downloading tool) ask for
username/password when it encounters a password-protected web page, you can set
the environment variable HTTP_AUTH to 'basic:*'.
d229 2
a230 1
In order to search for a string in some files, use 'grep' like this:
d232 1
a232 1
	 grep "string" filename1 [filename2 filename3 ...]
d234 7
a240 2
This will print out the lines in the files that contain the string.  grep can
also do a lot more advanced searches - type 'man grep' for details.
d242 3
a244 3
In order to support national characters for European languages in tools like
less without creating other nationalisation aspects, set the environment
variable LC_ALL to 'en_US.ISO8859-1'.
d246 2
a247 2
In tcsh, you can `set autolist' to have the shell automatically show
all the possible matches when doing filename/directory expansion.
d249 2
a250 1
"man firewall" will give advice for building a FreeBSD firewall
d256 29
a284 3
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).
You can get an introduction to each topic by typing
d286 6
a291 1
	man <number> intro
d293 2
a294 1
In other words, to get the intro to general commands, type
d296 4
a299 1
	man 1 intro
d306 6
a311 2
"man tuning" gives some tips how to tune performance of your FreeBSD system.
		-- David Scheidt <dscheidt@@tumbolia.com>
d313 2
a314 3
Need to do a search in a manpage or in a file you've sent to a pager? Use
"/search_word". To repeat the same search, type "n" for next.
		-- Dru <genesis@@istar.ca>
d316 2
a317 2
Need to find the location of a program? Use "locate program_name".
		-- Dru <genesis@@istar.ca>
d319 3
a321 4
Need to leave your terminal for a few minutes and don't want to logout?
Use "lock -p". When you return, use your password as the key to unlock the
terminal.
		-- Dru <genesis@@istar.ca>
d323 2
a324 3
Need to print a manpage? Use

	man name_of_manpage | col -bx | lpr
d327 1
a327 1
Need to quickly empty a file? Use ": > filename".
d330 1
a330 1
Need to quickly return to your home directory? Type "cd".
d333 3
a335 7
Need to remove all those ^M characters from a DOS file? Try

	tr -d \\r < dosfile > newfile
		-- Originally by Dru <genesis@@istar.ca>
%
Need to see the calendar for this month? Simply type "cal".  To see the
whole year, type "cal -y".
d338 2
a339 2
Need to see which daemons are listening for connection requests? Use
"sockstat -4l" for IPv4, and "sockstat -l" for IPv4 and IPv6.
d342 2
a343 2
Need to see your routing table? Type "netstat -rn". The entry with the G
flag is your gateway.
d346 3
a348 27
Nice bash prompt: PS1='(\[$(tput md)\]\t <\w>\[$(tput me)\]) $(echo $?) \$ '
		-- Mathieu <mathieu@@hal.interactionvirtuelle.com>
%
Nice tcsh prompts:
	set prompt = '[%B%m%b] %B%~%b%# '
	set prompt = '%m %# '
	set prompt = '%n@@%m%# '
	set prompt = '%n@@%m:%/%# '
	set prompt = '%n@@%m:%~%# '
%
Over quota?  "du -s * | sort -n " will give you a sorted list of your
directory sizes.
		-- David Scheidt <dscheidt@@tumbolia.com>
%
ports/net/netcat port is useful not only for redirecting input/output
to TCP or UDP connections, but also for proxying them with inetd(8).
%
sh (the default Bourne shell in FreeBSD) supports command-line editing.  Just
``set -o emacs'' or ``set -o vi'' to enable it.
%
Simple tcsh prompt: set prompt = '%# '
%
The default editor in FreeBSD is vi, which is efficient to use when you have
learned it, but somewhat user-unfriendly.  To use ee (an easier but less
powerful editor) instead, set the environment variable EDITOR to /usr/bin/ee
%
Time to change your password? Type "passwd" and follow the prompts.
d351 1
a351 1
To change an environment variable in /bin/sh use:
d353 1
a353 9
	$ VARIABLE="value"
	$ export VARIABLE
%
To change an environment variable in tcsh you use: setenv NAME "value"
where NAME is the name of the variable and "value" its new value.
%
To clear the screen, use "clear". To re-display your screen buffer, press
the scroll lock key and use your page up button. When you're finished,
press the scroll lock key again to get your prompt back.
d362 2
a363 6
To do a fast search for a file, try

	 locate filename

locate uses a database that is updated every Saturday (assuming your computer
is running FreeBSD at the time) to quickly find files based on name only.
d365 2
a366 1
To erase a line you've written at the command prompt, use "Ctrl-U".
d369 1
a369 1
To find out the hostname associated with an IP address, use
d371 1
a371 1
	dig -x IP_address
d374 1
a374 2
To obtain a neat PostScript rendering of a manual page, use ``-t'' switch
of the man(1) utility: ``man -t <topic>''.  For example:
d376 2
a377 3
	man -t grep > grep.ps	# Save the PostScript version to a file
or
	man -t printf | lp	# Send the PostScript directly to printer
d379 1
a379 1
To quickly create an empty file, use "touch filename".
d382 2
a383 2
To read a compressed file without having to first uncompress it, use
"zcat" or "zmore" to view it.
d386 3
a388 1
To repeat the last command in the C shell, type "!!".
d391 1
a391 2
To save disk space in your home directory, compress files you rarely
use with "gzip filename".
d394 1
a394 1
To search for files that match a particular name, use find(1); for example
d396 2
a397 4
	find / -name "*GENERIC*" -ls

will search '/', and all subdirectories, for files with 'GENERIC' in the name.
      	--  Stephen Hilton <nospam@@hiltonbsd.com>
d399 2
a400 3
To see all of the directories on your FreeBSD system, type

	ls -R / | more
d407 4
a410 1
To see how much disk space is left on your partitions, use
d412 1
a412 1
	df -h
d415 2
a416 1
To see the 10 largest files on a directory or partition, use
d418 1
a418 1
	du /partition_or_directory_name | sort -rn | head
d421 2
a422 2
To see the IP addresses currently set on your active interfaces, type
"ifconfig -u".
d425 2
a426 2
To see the last 10 lines of a long file, use "tail filename". To see the
first 10 lines, use "head filename".
d429 2
a430 1
To see the last time that you logged in, use lastlogin(8).
d433 2
a434 3
To see the MAC addresses of the NICs on your system, type

	ifconfig -a
d437 3
a439 3
To see the output from when your computer started, run dmesg(8).  If it has
been replaced with other messages, look at /var/run/dmesg.boot.
		-- Francisco Reyes <lists@@natserv.com>
d441 2
a442 2
Want colour in your directory listings?  Use "ls -G".  "ls -F" is also useful,
and they can be combined as "ls -FG".
d444 2
a445 6
Want to find a specific port, just type the following under /usr/ports,
or one its subdirectories:

	"make search name=<port-name>"
    or
	"make search key=<keyword>"
d447 1
a447 2
Want to know how many words, lines, or bytes are contained in a file? Type
"wc filename".
d450 2
a451 2
Want to see how much virtual memory you're using? Just type "swapinfo" to
be shown information about the usage of your swap partitions.
d453 1
a453 1
Want to strip UTF-8 BOM(Byte Order Mark) from given files?
d455 6
a460 1
	sed -e '1s/^\xef\xbb\xbf//' < bomfile > newfile
d462 1
a462 2
Want to use sed(1) to edit a file in place?  Well, to replace every 'e' with
an 'o', in a file named 'foo', you can do:
d464 8
a471 6
	sed -i.bak s/e/o/g foo

And you'll get a backup of the original in a file named 'foo.bak', but if you
want no backup:

	sed -i '' s/e/o/g foo
d480 2
a481 5
You can adjust the volume of various parts of the sound system in your
computer by typing 'mixer <type> <volume>'.  To get a list of what you can
adjust, just type 'mixer'.
%
You can automatically download and install binary packages by doing
d483 2
a484 5
	pkg_add -r <URL>

where you replace <URL> with the URL to the package.  This will also
automatically install the packages the package you download is dependent on
(ie, the packages it needs in order to work.)
d486 2
a487 2
You can change the video mode on all consoles by adding something like
the following to /etc/rc.conf:
d489 1
a489 1
	allscreens="80x30"
d491 2
a492 9
You can use "vidcontrol -i mode | grep T" for a list of supported text
modes.
		-- Konstantinos Konstantinidis <kkonstan@@duth.gr>
%
You can disable tcsh's terminal beep if you `set nobeep'.
%
You can get a good generic server install by using the
instant-server port/package.  If you have ports installed, you can
install it by doing
d494 1
a494 5
	# cd /usr/ports/misc/instant-server
	# make install && make clean

as root.  This will install a collection of packages that is appropriate for
running a "generic" server.
d496 2
a497 3
You can get a good standard workstation install by using the
instant-workstation port/package.  If you have ports installed, you can
install it by doing
d499 3
a501 5
	# cd /usr/ports/misc/instant-workstation
	# make install && make clean

as root.  This will install a collection of packages that is convenient to
have on a workstation.
d503 1
a503 3
You can install extra packages for FreeBSD by using the ports system.
If you have installed it, you can download, compile, and install software by
just typing
d505 1
a505 85
	# cd /usr/ports/<category>/<portname>
	# make install && make clean

as root.  The ports infrastructure will download the software, change it so
it works on FreeBSD, compile it, install it, register the installation so it
will be possible to automatically uninstall it, and clean out the temporary
working space it used.  You can remove an installed port you decide you do not
want after all by typing

	# cd /usr/ports/<category>/<portname>
	# make deinstall

as root.
%
You can look through a file in a nice text-based interface by typing

	less filename
%
You can make a log of your terminal session with script(1).
%
You can often get answers to your questions about FreeBSD by searching in the
FreeBSD mailing list archives at

	http://www.FreeBSD.org/search/search.html
%
You can open up a new split-screen window in (n)vi with :N or :E and then
use ^w to switch between the two.
%
You can permanently set environment variables for your shell by putting them
in a startup file for the shell.  The name of the startup file varies
depending on the shell - csh and tcsh uses .login, bash, sh, ksh and zsh use
.profile.  When using bash, sh, ksh or zsh, don't forget to export the
variable.
%
You can press Ctrl-D to quickly exit from a shell, or logout from a
login shell.
		-- Konstantinos Konstantinidis <kkonstan@@duth.gr>
%
You can press up-arrow or down-arrow to walk through a list of
previous commands in tcsh.
%
You can search for documentation on a keyword by typing

	apropos keyword
%
You can `set autologout = 30' to have tcsh log you off automatically
if you leave the shell idle for more than 30 minutes.
%
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'.  To list all
aliases, you can usually type just 'alias'.
%
You can use /etc/make.conf to control the options used to compile software
on this system.  Example entries are in
/usr/share/examples/etc/make.conf.
%
You can use "pkg_info" to see a list of packages you have installed.
		-- Konstantinos Konstantinidis <kkonstan@@duth.gr>
%
You can use the 'fetch' command to retrieve files over ftp or http.

	 fetch http://www.FreeBSD.org/index.html

will download the front page of the FreeBSD web site.
%
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 netscape" and "whereis whereis".
		-- Konstantinos Konstantinidis <kkonstan@@duth.gr>
%
@


1.39.2.3
log
@MFC all updates other than the combination of fortunes-o.real
and fortunes2.o.
@
text
@d4 2
a5 3
Any user that is a member of the wheel group can use "su -" to simulate
a root login. You can add a user to the wheel group by editing /etc/group.
		-- Konstantinos Konstantinidis <kkonstan@@duth.gr>
d10 9
a18 2
Can't remember if you've installed a certain port or not? Try "pkg_info
-Ix port_name".
d20 4
a23 3
Ever wonder what those numbers after command names were, as in cat(1)?  It's
the section of the manual the man page is in.  "man man" will tell you more.
		-- David Scheidt <dscheidt@@tumbolia.com>
d25 3
a27 1
Forget how to spell a word or a variation of a word? Use
d29 38
a66 2
	look portion_of_word_you_know
		-- Dru <genesis@@istar.ca>
d68 2
a69 2
Forget what directory you are in? Type "pwd".
		-- Dru <genesis@@istar.ca>
d71 4
a74 3
Forget when Easter is? Try "ncal -e". If you need the date for Orthodox
Easter, use "ncal -o" instead.
		-- Dru <genesis@@istar.ca>
d76 3
a78 5
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.
d80 6
a85 2
Handy bash(1) prompt:  PS1="\u@@\h \w \!$ "
		-- David Scheidt <dscheidt@@tumbolia.com>
d87 6
a92 2
Having trouble using fetch through a firewall? Try setting the environment
variable FTP_PASSIVE_MODE to yes, and see fetch(3) for more details.
d94 5
a98 3
If other operating systems have damaged your Master Boot Record, you can
reinstall it either with /usr/sbin/sysinstall or with boot0cfg(8). See
"man boot0cfg" for details.
d100 3
a102 2
If you accidentally end up inside vi, you can quit it by pressing Escape, colon
(:), q (q), bang (!) and pressing return.
d104 5
a108 3
If you are in the C shell and have just installed a new program, you won't
be able to run it unless you first type "rehash".
		-- Dru <genesis@@istar.ca>
d126 1
a126 5
If you have a CD-ROM drive in your machine, you can make the CD-ROM that is
presently inserted available by typing 'mount /cdrom' as root.  The CD-ROM
will be available under /cdrom/.  Remember to do 'umount /cdrom' before
removing the CD-ROM (it will usually not be possible to remove the CD-ROM
without doing this.)
d128 5
a132 1
Note: This tip may not work in all configurations.
d134 2
a135 3
If you need a reminder to leave your terminal, type "leave +hhmm" where
"hhmm" represents in how many hours and minutes you need to leave.
		-- Dru <genesis@@istar.ca>
d137 9
a145 1
If you need to ask a question on the FreeBSD-questions mailing list then
d147 3
a149 2
	http://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/\
		freebsd-questions/index.html
d151 2
a152 1
contains lots of useful advice to help you get the best results.
d154 3
a156 3
If you `set filec' (file completion) in tcsh and write a part of the
filename, pressing TAB will show you the available choices when there
is more than one, or complete the filename if there's only one match.
d158 3
a160 2
If you `set watch = (0 any any)' in tcsh, you will be notified when
someone logs in or out of your system.
d162 7
a168 2
If you use the C shell, add the following line to the .cshrc file in your
home directory to prevent core files from being written to disk:
d170 1
a170 2
	limit coredumpsize 0
		-- Dru <genesis@@istar.ca>
d172 5
a176 5
If you want df(1) and other commands to display disk sizes in
kilobytes instead of 512-byte blocks, set BLOCKSIZE in your
environment to 'K'.  You can also use 'M' for Megabytes or 'G' for
Gigabytes.  If you want df(1) to automatically select the best size
then use 'df -h'.
d182 23
a204 2
If you want to quickly check for duplicate package/port installations,
try the following pkg_info command.
d206 8
a213 2
	pkg_info | sort | sed -e 's/-[0-9].*$//' | \
	uniq -c | grep -v '^[[:space:]]*1'
d215 3
a217 2
If you'd like to keep track of applications in the FreeBSD ports tree, take a
look at FreshPorts;
d219 6
a224 1
	http://www.freshports.org/
d226 2
a227 3
In order to make fetch (the FreeBSD downloading tool) ask for
username/password when it encounters a password-protected web page, you can set
the environment variable HTTP_AUTH to 'basic:*'.
d229 2
a230 1
In order to search for a string in some files, use 'grep' like this:
d232 1
a232 1
	 grep "string" filename1 [filename2 filename3 ...]
d234 7
a240 2
This will print out the lines in the files that contain the string.  grep can
also do a lot more advanced searches - type 'man grep' for details.
d242 3
a244 3
In order to support national characters for European languages in tools like
less without creating other nationalisation aspects, set the environment
variable LC_ALL to 'en_US.ISO8859-1'.
d246 2
a247 2
In tcsh, you can `set autolist' to have the shell automatically show
all the possible matches when doing filename/directory expansion.
d249 2
a250 1
"man firewall" will give advice for building a FreeBSD firewall
d256 29
a284 3
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).
You can get an introduction to each topic by typing
d286 6
a291 1
	man <number> intro
d293 2
a294 1
In other words, to get the intro to general commands, type
d296 4
a299 1
	man 1 intro
d306 6
a311 2
"man tuning" gives some tips how to tune performance of your FreeBSD system.
		-- David Scheidt <dscheidt@@tumbolia.com>
d313 2
a314 3
Need to do a search in a manpage or in a file you've sent to a pager? Use
"/search_word". To repeat the same search, type "n" for next.
		-- Dru <genesis@@istar.ca>
d316 2
a317 2
Need to find the location of a program? Use "locate program_name".
		-- Dru <genesis@@istar.ca>
d319 3
a321 4
Need to leave your terminal for a few minutes and don't want to logout?
Use "lock -p". When you return, use your password as the key to unlock the
terminal.
		-- Dru <genesis@@istar.ca>
d323 2
a324 3
Need to print a manpage? Use

	man name_of_manpage | col -bx | lpr
d327 1
a327 1
Need to quickly empty a file? Use ": > filename".
d330 1
a330 1
Need to quickly return to your home directory? Type "cd".
d333 3
a335 7
Need to remove all those ^M characters from a DOS file? Try

	tr -d \\r < dosfile > newfile
		-- Originally by Dru <genesis@@istar.ca>
%
Need to see the calendar for this month? Simply type "cal".  To see the
whole year, type "cal -y".
d338 2
a339 2
Need to see which daemons are listening for connection requests? Use
"sockstat -4l" for IPv4, and "sockstat -l" for IPv4 and IPv6.
d342 2
a343 2
Need to see your routing table? Type "netstat -rn". The entry with the G
flag is your gateway.
d346 3
a348 27
Nice bash prompt: PS1='(\[$(tput md)\]\t <\w>\[$(tput me)\]) $(echo $?) \$ '
		-- Mathieu <mathieu@@hal.interactionvirtuelle.com>
%
Nice tcsh prompts:
	set prompt = '[%B%m%b] %B%~%b%# '
	set prompt = '%m %# '
	set prompt = '%n@@%m%# '
	set prompt = '%n@@%m:%/%# '
	set prompt = '%n@@%m:%~%# '
%
Over quota?  "du -s * | sort -n " will give you a sorted list of your
directory sizes.
		-- David Scheidt <dscheidt@@tumbolia.com>
%
ports/net/netcat port is useful not only for redirecting input/output
to TCP or UDP connections, but also for proxying them with inetd(8).
%
sh (the default Bourne shell in FreeBSD) supports command-line editing.  Just
``set -o emacs'' or ``set -o vi'' to enable it.
%
Simple tcsh prompt: set prompt = '%# '
%
The default editor in FreeBSD is vi, which is efficient to use when you have
learned it, but somewhat user-unfriendly.  To use ee (an easier but less
powerful editor) instead, set the environment variable EDITOR to /usr/bin/ee
%
Time to change your password? Type "passwd" and follow the prompts.
d351 1
a351 1
To change an environment variable in /bin/sh use:
d353 1
a353 9
	$ VARIABLE="value"
	$ export VARIABLE
%
To change an environment variable in tcsh you use: setenv NAME "value"
where NAME is the name of the variable and "value" its new value.
%
To clear the screen, use "clear". To re-display your screen buffer, press
the scroll lock key and use your page up button. When you're finished,
press the scroll lock key again to get your prompt back.
d362 2
a363 6
To do a fast search for a file, try

	 locate filename

locate uses a database that is updated every Saturday (assuming your computer
is running FreeBSD at the time) to quickly find files based on name only.
d365 2
a366 1
To erase a line you've written at the command prompt, use "Ctrl-U".
d369 1
a369 1
To find out the hostname associated with an IP address, use
d371 1
a371 1
	dig -x IP_address
d374 1
a374 2
To obtain a neat PostScript rendering of a manual page, use ``-t'' switch
of the man(1) utility: ``man -t <topic>''.  For example:
d376 2
a377 3
	man -t grep > grep.ps	# Save the PostScript version to a file
or
	man -t printf | lp	# Send the PostScript directly to printer
d379 1
a379 1
To quickly create an empty file, use "touch filename".
d382 2
a383 2
To read a compressed file without having to first uncompress it, use
"zcat" or "zmore" to view it.
d386 3
a388 1
To repeat the last command in the C shell, type "!!".
d391 1
a391 2
To save disk space in your home directory, compress files you rarely
use with "gzip filename".
d394 1
a394 1
To search for files that match a particular name, use find(1); for example
d396 2
a397 4
	find / -name "*GENERIC*" -ls

will search '/', and all subdirectories, for files with 'GENERIC' in the name.
      	--  Stephen Hilton <nospam@@hiltonbsd.com>
d399 2
a400 3
To see all of the directories on your FreeBSD system, type

	ls -R / | more
d407 4
a410 1
To see how much disk space is left on your partitions, use
d412 1
a412 1
	df -h
d415 2
a416 1
To see the 10 largest files on a directory or partition, use
d418 1
a418 1
	du /partition_or_directory_name | sort -rn | head
d421 2
a422 2
To see the IP addresses currently set on your active interfaces, type
"ifconfig -u".
d425 2
a426 2
To see the last 10 lines of a long file, use "tail filename". To see the
first 10 lines, use "head filename".
d429 2
a430 1
To see the last time that you logged in, use lastlogin(8).
d433 2
a434 3
To see the MAC addresses of the NICs on your system, type

	ifconfig -a
d437 3
a439 3
To see the output from when your computer started, run dmesg(8).  If it has
been replaced with other messages, look at /var/run/dmesg.boot.
		-- Francisco Reyes <lists@@natserv.com>
d441 2
a442 2
Want colour in your directory listings?  Use "ls -G".  "ls -F" is also useful,
and they can be combined as "ls -FG".
d444 2
a445 6
Want to find a specific port, just type the following under /usr/ports,
or one its subdirectories:

	"make search name=<port-name>"
    or
	"make search key=<keyword>"
d447 1
a447 2
Want to know how many words, lines, or bytes are contained in a file? Type
"wc filename".
d450 2
a451 2
Want to see how much virtual memory you're using? Just type "swapinfo" to
be shown information about the usage of your swap partitions.
d453 1
a453 1
Want to strip UTF-8 BOM(Byte Order Mark) from given files?
d455 6
a460 1
	sed -e '1s/^\xef\xbb\xbf//' < bomfile > newfile
d462 1
a462 2
Want to use sed(1) to edit a file in place?  Well, to replace every 'e' with
an 'o', in a file named 'foo', you can do:
d464 8
a471 6
	sed -i.bak s/e/o/g foo

And you'll get a backup of the original in a file named 'foo.bak', but if you
want no backup:

	sed -i '' s/e/o/g foo
d480 2
a481 5
You can adjust the volume of various parts of the sound system in your
computer by typing 'mixer <type> <volume>'.  To get a list of what you can
adjust, just type 'mixer'.
%
You can automatically download and install binary packages by doing
d483 2
a484 5
	pkg_add -r <URL>

where you replace <URL> with the URL to the package.  This will also
automatically install the packages the package you download is dependent on
(ie, the packages it needs in order to work.)
d486 2
a487 2
You can change the video mode on all consoles by adding something like
the following to /etc/rc.conf:
d489 1
a489 1
	allscreens="80x30"
d491 2
a492 9
You can use "vidcontrol -i mode | grep T" for a list of supported text
modes.
		-- Konstantinos Konstantinidis <kkonstan@@duth.gr>
%
You can disable tcsh's terminal beep if you `set nobeep'.
%
You can get a good generic server install by using the
instant-server port/package.  If you have ports installed, you can
install it by doing
d494 1
a494 5
	# cd /usr/ports/misc/instant-server
	# make install && make clean

as root.  This will install a collection of packages that is appropriate for
running a "generic" server.
d496 2
a497 3
You can get a good standard workstation install by using the
instant-workstation port/package.  If you have ports installed, you can
install it by doing
d499 3
a501 5
	# cd /usr/ports/misc/instant-workstation
	# make install && make clean

as root.  This will install a collection of packages that is convenient to
have on a workstation.
d503 1
a503 3
You can install extra packages for FreeBSD by using the ports system.
If you have installed it, you can download, compile, and install software by
just typing
d505 1
a505 85
	# cd /usr/ports/<category>/<portname>
	# make install && make clean

as root.  The ports infrastructure will download the software, change it so
it works on FreeBSD, compile it, install it, register the installation so it
will be possible to automatically uninstall it, and clean out the temporary
working space it used.  You can remove an installed port you decide you do not
want after all by typing

	# cd /usr/ports/<category>/<portname>
	# make deinstall

as root.
%
You can look through a file in a nice text-based interface by typing

	less filename
%
You can make a log of your terminal session with script(1).
%
You can often get answers to your questions about FreeBSD by searching in the
FreeBSD mailing list archives at

	http://www.FreeBSD.org/search/search.html
%
You can open up a new split-screen window in (n)vi with :N or :E and then
use ^w to switch between the two.
%
You can permanently set environment variables for your shell by putting them
in a startup file for the shell.  The name of the startup file varies
depending on the shell - csh and tcsh uses .login, bash, sh, ksh and zsh use
.profile.  When using bash, sh, ksh or zsh, don't forget to export the
variable.
%
You can press Ctrl-D to quickly exit from a shell, or logout from a
login shell.
		-- Konstantinos Konstantinidis <kkonstan@@duth.gr>
%
You can press up-arrow or down-arrow to walk through a list of
previous commands in tcsh.
%
You can search for documentation on a keyword by typing

	apropos keyword
%
You can `set autologout = 30' to have tcsh log you off automatically
if you leave the shell idle for more than 30 minutes.
%
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'.  To list all
aliases, you can usually type just 'alias'.
%
You can use /etc/make.conf to control the options used to compile software
on this system.  Example entries are in
/usr/share/examples/etc/make.conf.
%
You can use "pkg_info" to see a list of packages you have installed.
		-- Konstantinos Konstantinidis <kkonstan@@duth.gr>
%
You can use the 'fetch' command to retrieve files over ftp or http.

	 fetch http://www.FreeBSD.org/index.html

will download the front page of the FreeBSD web site.
%
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 netscape" and "whereis whereis".
		-- Konstantinos Konstantinidis <kkonstan@@duth.gr>
%
@


1.39.2.4
log
@Switch importer
@
text
@d2 1
a2 1
$FreeBSD: stable/6/games/fortune/datfiles/freebsd-tips 174524 2007-12-10 19:34:26Z dougb $
@


1.39.2.3.2.1
log
@SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith

Create releng/6.4 from stable/6 in preparation for 6.4-RC1.

Approved by:	re (implicit)
@
text
@@


1.38
log
@Give a better advice on how to convert DOS text to UNIX text.
The former tip used `col -bx', which would not only discard
CR's, but also expand TAB's and remove BS'en.  This effect is
not always wanted.

MFC after:	1 week
@
text
@d101 1
a101 1
username/password when it encounter a password-protected web page, you can set
@


1.37
log
@Remove committer-specific entry.
@
text
@d377 2
a378 2
	col -bx < dosfile > newfile
		-- Dru <genesis@@istar.ca>
@


1.36
log
@Minor bit of advice.
@
text
@a502 4
%
If you receive email from the grim reaper, you can silence him and
keep your bit for another year with a token commit to a fortune(6)
or calendar(1) data file.
@


1.35
log
@There is a better way to find out whether a port is installed or not.
@
text
@d503 4
@


1.34
log
@Fix make search entries.

PR:		docs/70899
Submitted by:	Marc Silver <marcs@@draenor.org>
@
text
@d442 2
a443 3
Can't remember if you've installed a certain port or not? Try "pkg_info |
grep port_name".
		-- Dru <genesis@@istar.ca>
@


1.33
log
@Fix misspellings in the freebsd-tips fortunes.  The same PR has
a patch to mention portupgrade in freebsd-tips as well; I'm not
sure if that belongs here, so I'll leave it for someone else.

PR:		misc/37073
Submitted by:	Sean Chittenden <sean@@chittenden.org>
Approved by:	rwatson (mentor)
@
text
@d309 1
a309 1
	"make search port=<port-name>"
d311 1
a311 1
	"make search key="<keyword>"
@


1.33.2.1
log
@MFC 1.38:

Give a better advice on how to convert DOS text to UNIX text.
The former tip used `col -bx', which would not only discard
CR's, but also expand TAB's and remove BS'en.  This effect is
not always wanted.

Approved by:	re (kensmith)
@
text
@d377 2
a378 2
	tr -d \\r < dosfile > newfile
		-- Originally by Dru <genesis@@istar.ca>
@


1.33.2.2
log
@MFC: Typo fix

Approved by:	re (kensmith)
@
text
@d101 1
a101 1
username/password when it encounters a password-protected web page, you can set
@


1.32
log
@Add a tip on how to print a manual page.

PR:		docs/61033
Submitted by:	mi@@
@
text
@d134 1
a134 1
If you accidently end up inside vi, you can quit it by pressing Escape, colon
d139 1
a139 1
bourne shell style, as in /bin/sh, bash, ksh, and zsh):
d154 1
a154 1
In order to support national characters for european languages in tools like
d472 1
a472 1
sh (the default bourne shell in FreeBSD) supports command-line editing.  Just
@


1.31
log
@Fix a tip about how to create an empty file[1].
Remove tip about retired kget(8).
Fix a typo.

PR:	conf/54334
Submitted by:	Mark Huizer <xaa+sendpr@@timewasters.nl>
MFC after:	3 days
@
text
@d497 7
@


1.30
log
@Remove the suggestion to try `hangman', because it does not exist
in the base system anymore.
@
text
@d442 1
a442 1
Can't remember is you've installed a certain port or not? Try "pkg_info |
d452 1
a452 1
Need to quickly empty a file? Use "echo > filename".
a467 4
%
You can save your kernel startup configuration with kget(8).  The
Configuration can be edited at boot time with 'boot -c' command in loader.
See boot(8), loader(8) for details.
@


1.29
log
@set watch in tcsh requires an equal sign after the variable name.

MFC after:	1 day
@
text
@a445 3
Got some time to kill? Try typing "hangman".
		-- Dru <genesis@@istar.ca>
%
@


1.28
log
@Minor grammatical correction
@
text
@d47 1
a47 1
If you `set watch (0 any any)' in tcsh, you will be notified when
@


1.27
log
@Fix the path to the make.conf example file.

PR:		docs/44278
Submitted by:	Chris Pepper <pepper@@rockefeller.edu>
@
text
@d339 2
a340 2
To save disk space in your home directory, can compress files you
rarely use with "gzip filename".
@


1.26
log
@Add a tip about using sed(1)'s FreeBSD-specific -i option.

MFC after:	42 days
@
text
@d77 2
a78 1
on this system.  Example entries are in /usr/share/examples/etc/make.conf.
@


1.25
log
@Fix a typo.

PR:		40539
Submitted by:	Munish Chopra <mchopra@@engmail.uwaterloo.ca>
@
text
@d493 10
@


1.24
log
@Paraphrase a quote to remove year specific references.

PR:		40291
Submitted by:	Pierre-Paul Lavoie <ppl@@nbnet.nb.ca>
@
text
@d421 1
a421 1
If you need a reminder to leave your terminal, type "leave hhmm" where
@


1.23
log
@* Add $FreeBSD$ to limerick and zippy
* Delete trailing white space in all its forms. In addition to being
bad style in general, it also causes formatting, and other problems
for various third party items (like xscreensaver) which use fortunes
for their own purposes.
@
text
@d324 1
a324 1
whole year, type "cal 2002".
@


1.22
log
@Add a few more tips, and tweak a couple.

PR:		misc/34039
@
text
@d64 1
a64 1
environment to 'K'.  You can also use 'M' for Megabytes or 'G' for 
d298 1
a298 1
You can make a log of your terminal session with script(1). 
d300 1
a300 1
"man ports" gives many useful hints about installing FreeBSD ports. 
d315 3
a317 3
ports/net/netcat port is useful not only for redirecting input/output 
to TCP or UDP connections, but also for proxying them. See inetd(8) for 
details. 
d319 2
a320 2
If other operating systems have damaged your Master Boot Record, you can 
reinstall it either with /stand/sysinstall or with boot0cfg(8). See 
d323 2
a324 2
Need to see the calendar for this month? Simply type "cal".  To see the 
whole year, type "cal 2002". 
d327 1
a327 1
Need to quickly return to your home directory? Type "cd". 
d330 1
a330 1
To see the last time that you logged in, use lastlogin(8). 
d333 3
a335 3
To clear the screen, use "clear". To re-display your screen buffer, press 
the scroll lock key and use your page up button. When you're finished, 
press the scroll lock key again to get your prompt back. 
d338 2
a339 2
To save disk space in your home directory, can compress files you 
rarely use with "gzip filename". 
d342 2
a343 2
To read a compressed file without having to first uncompress it, use 
"zcat" or "zmore" to view it. 
d346 1
a346 1
To see how much disk space is left on your partitions, use 
d351 1
a351 1
To see the 10 largest files on a directory or partition, use 
d356 2
a357 2
To determine whether a file is a text file, executable, or some other type 
of file, use 
d362 1
a362 1
Time to change your password? Type "passwd" and follow the prompts. 
d365 2
a366 2
Want to know how many words, lines, or bytes are contained in a file? Type 
"wc filename". 
d369 1
a369 1
Need to print a manpage? Use 
d374 1
a374 1
Need to remove all those ^M characters from a DOS file? Try 
d379 1
a379 1
Forget what directory you are in? Type "pwd". 
d382 2
a383 2
If you are in the C shell and have just installed a new program, you won't 
be able to run it unless you first type "rehash". 
d386 3
a388 3
Need to leave your terminal for a few minutes and don't want to logout? 
Use "lock -p". When you return, use your password as the key to unlock the 
terminal. 
d391 1
a391 1
Need to find the location of a program? Use "locate program_name". 
d394 1
a394 1
Forget how to spell a word or a variation of a word? Use 
d399 2
a400 2
To see the last 10 lines of a long file, use "tail filename". To see the 
first 10 lines, use "head filename". 
d403 2
a404 2
To see how long it takes a command to run, type the word "time" before the 
command name. 
d407 1
a407 1
To quickly create an empty file, use "touch filename". 
d410 1
a410 1
To find out the hostname associated with an IP address, use 
d415 2
a416 2
If you use the C shell, add the following line to the .cshrc file in your 
home directory to prevent core files from being written to disk: 
d421 2
a422 2
If you need a reminder to leave your terminal, type "leave hhmm" where 
"hhmm" represents in how many hours and minutes you need to leave. 
d425 2
a426 2
Need to do a search in a manpage or in a file you've sent to a pager? Use 
"/search_word". To repeat the same search, type "n" for next. 
d429 2
a430 2
Forget when Easter is? Try "ncal -e". If you need the date for Orthodox 
Easter, use "ncal -o" instead. 
d433 2
a434 2
Need to see your routing table? Type "netstat -rn". The entry with the G 
flag is your gateway. 
d437 2
a438 2
Need to see which daemons are listening for connection requests? Use 
"sockstat -4l" for IPv4, and "sockstat -l" for IPv4 and IPv6. 
d441 2
a442 2
Can't remember is you've installed a certain port or not? Try "pkg_info | 
grep port_name". 
d445 1
a445 1
Got some time to kill? Try typing "hangman". 
d448 1
a448 1
To erase a line you've written at the command prompt, use "Ctrl-U". 
d451 1
a451 1
To repeat the last command in the C shell, type "!!". 
d454 1
a454 1
Need to quickly empty a file? Use "echo > filename". 
d457 1
a457 1
To see all of the directories on your FreeBSD system, type 
d462 2
a463 2
To see the IP addresses currently set on your active interfaces, type 
"ifconfig -u". 
d466 1
a466 1
To see the MAC addresses of the NICs on your system, type 
@


1.21
log
@Augment the BLOCKSIZE tip.  (Based on the PR with slight changes by myself).

PR:	misc/34039
@
text
@d302 13
d324 1
a324 1
whole year, type "cal 2001". 
d448 1
a448 1
To erase a line you've written at the command prompt, use "Ctrl u". 
@


1.20
log
@Add a tip about pkg_info and checking for multiple installed versions
of a package/port.
@
text
@d64 3
a66 1
environment to 'K'.
@


1.19
log
@Modify tip that no longer applies for ftp(1).
@
text
@d472 6
@


1.18
log
@Other committers do not mention their personal names and/or email
addresses when adding stuff, so it seems fair to stop ``getting all
the fame'' by having my name displayed on login sessions.

Approved by:	nik
@
text
@d4 2
a5 2
Having trouble using FTP through a firewall?  Try setting the environment
variable FTP_PASSIVE_MODE to yes, and see ftp(1) for more details.
@


1.17
log
@Tip Correction : s/seconds/minutes/

PR:		docs/30844
Submitted by:	Andrew <andrew@@ugh.net.au>
@
text
@d2 1
a2 1
$FreeBSD: src/games/fortune/datfiles/freebsd-tips,v 1.16 2001/08/30 22:44:50 alex Exp $
a33 1
		--  Giorgos Keramidas <keramida@@ceid.upatras.gr>
a36 1
		--  Giorgos Keramidas <keramida@@ceid.upatras.gr>
a40 1
		--  Giorgos Keramidas <keramida@@ceid.upatras.gr>
a43 1
		--  Giorgos Keramidas <keramida@@ceid.upatras.gr>
a45 1
		--  Giorgos Keramidas <keramida@@ceid.upatras.gr>
a48 1
		--  Giorgos Keramidas <keramida@@ceid.upatras.gr>
a50 1
		--  Giorgos Keramidas <keramida@@ceid.upatras.gr>
a52 1
		--  Giorgos Keramidas <keramida@@ceid.upatras.gr>
a54 1
		--  Giorgos Keramidas <keramida@@ceid.upatras.gr>
a56 1
		--  Giorgos Keramidas <keramida@@ceid.upatras.gr>
a60 1
		--  Giorgos Keramidas <keramida@@ceid.upatras.gr>
a64 1
		--  Giorgos Keramidas <keramida@@ceid.upatras.gr>
a67 1
		--  Giorgos Keramidas <keramida@@ceid.upatras.gr>
a72 1
		--  Giorgos Keramidas <keramida@@ceid.upatras.gr>
@


1.16
log
@Move /etc/defaults/make.conf to /usr/share/examples/etc/make.conf as
discussed on the arch@@ mailinglist (after repo-copy).

sys.mk will .error if it finds /etc/defaults/make.conf but include
it anyways (this is the same behaviour as with the make.conf.local
removal).

/usr/share/examples/etc/make.conf has BDEFLAGS commented out now,
since it's only an example file.

Adjust all textes that talk about make.conf or defaults/make.conf to
match the new situation.
@
text
@d2 1
a2 1
$FreeBSD: src/games/fortune/datfiles/freebsd-tips,v 1.15 2001/08/12 20:32:37 mharo Exp $
d37 1
a37 1
if you leave the shell idle for more than 30 seconds.
@


1.15
log
@Remove whitespace after %.  The whitespace was causing strfile to not see
the % string section break and thus fortune was producing a rather large
multi-fortune fortune message.
@
text
@d2 1
a2 1
$FreeBSD: src/games/fortune/datfiles/freebsd-tips,v 1.14 2001/06/30 14:42:20 mpp Exp $
d88 2
a89 2
/etc/make.conf contains overrides to /etc/defaults/make.conf, which
controls the options used to compile software on this system.
@


1.14
log
@Fix a couple of typos.
@
text
@d2 1
a2 1
$FreeBSD: src/games/fortune/datfiles/freebsd-tips,v 1.13 2001/06/26 02:36:26 dd Exp $
d309 1
a309 1
% 
d311 1
a311 1
% 
d313 1
a313 1
% 
d317 1
a317 1
% 
d321 1
a321 1
% 
d325 1
a325 1
% 
d328 1
a328 1
% 
d331 1
a331 1
% 
d336 1
a336 1
% 
d340 1
a340 1
% 
d344 1
a344 1
% 
d349 1
a349 1
% 
d354 1
a354 1
% 
d360 1
a360 1
% 
d363 1
a363 1
% 
d367 1
a367 1
% 
d372 1
a372 1
% 
d377 1
a377 1
% 
d380 1
a380 1
% 
d384 1
a384 1
% 
d389 1
a389 1
% 
d392 1
a392 1
% 
d397 1
a397 1
% 
d401 1
a401 1
% 
d405 1
a405 1
% 
d408 1
a408 1
% 
d413 1
a413 1
% 
d419 1
a419 1
% 
d423 1
a423 1
% 
d427 1
a427 1
% 
d431 1
a431 1
% 
d435 1
a435 1
% 
d439 1
a439 1
% 
d443 1
a443 1
% 
d446 1
a446 1
% 
d449 1
a449 1
% 
d452 1
a452 1
% 
d455 1
a455 1
% 
d460 1
a460 1
% 
d464 1
a464 1
% 
@


1.14.2.1
log
@Sync with -current, and add freebsd-tips
@
text
@d2 1
a2 1
$FreeBSD$
@


1.14.2.2
log
@MFC 1.15:  Remove whitespace after %.

Approved by: re
@
text
@d2 1
a2 1
$FreeBSD: src/games/fortune/datfiles/freebsd-tips,v 1.14.2.1 2001/08/01 17:24:03 obrien Exp $
d309 1
a309 1
%
d311 1
a311 1
%
d313 1
a313 1
%
d317 1
a317 1
%
d321 1
a321 1
%
d325 1
a325 1
%
d328 1
a328 1
%
d331 1
a331 1
%
d336 1
a336 1
%
d340 1
a340 1
%
d344 1
a344 1
%
d349 1
a349 1
%
d354 1
a354 1
%
d360 1
a360 1
%
d363 1
a363 1
%
d367 1
a367 1
%
d372 1
a372 1
%
d377 1
a377 1
%
d380 1
a380 1
%
d384 1
a384 1
%
d389 1
a389 1
%
d392 1
a392 1
%
d397 1
a397 1
%
d401 1
a401 1
%
d405 1
a405 1
%
d408 1
a408 1
%
d413 1
a413 1
%
d419 1
a419 1
%
d423 1
a423 1
%
d427 1
a427 1
%
d431 1
a431 1
%
d435 1
a435 1
%
d439 1
a439 1
%
d443 1
a443 1
%
d446 1
a446 1
%
d449 1
a449 1
%
d452 1
a452 1
%
d455 1
a455 1
%
d460 1
a460 1
%
d464 1
a464 1
%
@


1.14.2.3
log
@MFC: 1.18: remove my name from the list of freebsd tips like the rest
of the FreeBSD people.
@
text
@d2 1
a2 1
$FreeBSD$
d34 1
d38 1
d43 1
d47 1
d50 1
d54 1
d57 1
d60 1
d63 1
d66 1
d71 1
d76 1
d80 1
d86 1
@


1.14.2.4
log
@MFC: r1.17 - correction s/seconds/minutes.
@
text
@d36 1
a36 1
if you leave the shell idle for more than 30 minutes.
@


1.14.2.5
log
@MFC: v1.24 Paraphrase a quote to remove year specific references.
@
text
@d309 1
a309 1
whole year, type "cal -y". 
@


1.14.2.6
log
@Sync with -CURRENT.
@
text
@d4 2
a5 2
Having trouble using fetch through a firewall? Try setting the environment
variable FTP_PASSIVE_MODE to yes, and see fetch(3) for more details.
d64 1
a64 3
environment to 'K'.  You can also use 'M' for Megabytes or 'G' for
Gigabytes.  If you want df(1) to automatically select the best size
then use 'df -h'.
d74 2
a75 2
You can use /etc/make.conf to control the options used to compile software
on this system.  Example entries are in /usr/share/examples/etc/make.conf.
d296 1
a296 1
You can make a log of your terminal session with script(1).
d298 1
a298 1
"man ports" gives many useful hints about installing FreeBSD ports.
d300 3
a302 2
"man security" gives very good advice on how to tune the security of your
FreeBSD system.
d304 2
a305 16
Want to find a specific port, just type the following under /usr/ports,
or one its subdirectories:

	"make search port=<port-name>"
    or
	"make search key="<keyword>"
%
Want to see how much virtual memory you're using? Just type "swapinfo" to
be shown information about the usage of your swap partitions.
%
ports/net/netcat port is useful not only for redirecting input/output
to TCP or UDP connections, but also for proxying them. See inetd(8) for
details.
%
If other operating systems have damaged your Master Boot Record, you can
reinstall it either with /stand/sysinstall or with boot0cfg(8). See
d308 2
a309 2
Need to see the calendar for this month? Simply type "cal".  To see the
whole year, type "cal -y".
d312 1
a312 1
Need to quickly return to your home directory? Type "cd".
d315 1
a315 1
To see the last time that you logged in, use lastlogin(8).
d318 3
a320 3
To clear the screen, use "clear". To re-display your screen buffer, press
the scroll lock key and use your page up button. When you're finished,
press the scroll lock key again to get your prompt back.
d323 2
a324 2
To save disk space in your home directory, can compress files you
rarely use with "gzip filename".
d327 2
a328 2
To read a compressed file without having to first uncompress it, use
"zcat" or "zmore" to view it.
d331 1
a331 1
To see how much disk space is left on your partitions, use
d336 1
a336 1
To see the 10 largest files on a directory or partition, use
d341 2
a342 2
To determine whether a file is a text file, executable, or some other type
of file, use
d347 1
a347 1
Time to change your password? Type "passwd" and follow the prompts.
d350 2
a351 2
Want to know how many words, lines, or bytes are contained in a file? Type
"wc filename".
d354 1
a354 1
Need to print a manpage? Use
d359 1
a359 1
Need to remove all those ^M characters from a DOS file? Try
d364 1
a364 1
Forget what directory you are in? Type "pwd".
d367 2
a368 2
If you are in the C shell and have just installed a new program, you won't
be able to run it unless you first type "rehash".
d371 3
a373 3
Need to leave your terminal for a few minutes and don't want to logout?
Use "lock -p". When you return, use your password as the key to unlock the
terminal.
d376 1
a376 1
Need to find the location of a program? Use "locate program_name".
d379 1
a379 1
Forget how to spell a word or a variation of a word? Use
d384 2
a385 2
To see the last 10 lines of a long file, use "tail filename". To see the
first 10 lines, use "head filename".
d388 2
a389 2
To see how long it takes a command to run, type the word "time" before the
command name.
d392 1
a392 1
To quickly create an empty file, use "touch filename".
d395 1
a395 1
To find out the hostname associated with an IP address, use
d400 2
a401 2
If you use the C shell, add the following line to the .cshrc file in your
home directory to prevent core files from being written to disk:
d406 2
a407 2
If you need a reminder to leave your terminal, type "leave +hhmm" where
"hhmm" represents in how many hours and minutes you need to leave.
d410 2
a411 2
Need to do a search in a manpage or in a file you've sent to a pager? Use
"/search_word". To repeat the same search, type "n" for next.
d414 2
a415 2
Forget when Easter is? Try "ncal -e". If you need the date for Orthodox
Easter, use "ncal -o" instead.
d418 2
a419 2
Need to see your routing table? Type "netstat -rn". The entry with the G
flag is your gateway.
d422 2
a423 2
Need to see which daemons are listening for connection requests? Use
"sockstat -4l" for IPv4, and "sockstat -l" for IPv4 and IPv6.
d426 2
a427 2
Can't remember is you've installed a certain port or not? Try "pkg_info |
grep port_name".
d430 1
a430 1
Got some time to kill? Try typing "hangman".
d433 1
a433 1
To erase a line you've written at the command prompt, use "Ctrl-U".
d436 1
a436 1
To repeat the last command in the C shell, type "!!".
d439 1
a439 1
Need to quickly empty a file? Use "echo > filename".
d442 1
a442 1
To see all of the directories on your FreeBSD system, type
d447 2
a448 2
To see the IP addresses currently set on your active interfaces, type
"ifconfig -u".
d451 1
a451 1
To see the MAC addresses of the NICs on your system, type
a471 6
%
If you want to quickly check for duplicate package/port installations,
try the following pkg_info command.

	pkg_info | sort | sed -e 's/-[0-9].*$//' | \
	uniq -c | grep -v '^[[:space:]]*1'
@


1.14.2.7
log
@MFC revision 1.26:
  Add a tip about using sed(1)'s FreeBSD-specific -i option.
@
text
@a492 10
%
Want to use sed(1) to edit a file in place?  Well, to replace every 'e' with
an 'o', in a file named 'foo', you can do:

	sed -i.bak s/e/o/g foo

And you'll get a backup of the original in a file named 'foo.bak', but if you
want no backup:

	sed -i '' s/e/o/g foo
@


1.14.2.8
log
@MFC:
1.26 Fix the path to the make.conf example file.
1.27 Minor grammatical correction.
@
text
@d77 1
a77 2
on this system.  Example entries are in
/usr/share/examples/etc/defaults/make.conf.
d338 2
a339 2
To save disk space in your home directory, compress files you rarely
use with "gzip filename".
@


1.14.2.9
log
@Forced commit.
Previous commit was MFC of revisions 1.27 and 1.28, not 1.26 and 1.27

Large Pointy Hat: blackend
@
text
@@


1.14.2.10
log
@MFC 1.29: add equal sign after tcsh variable name.
@
text
@d47 1
a47 1
If you `set watch = (0 any any)' in tcsh, you will be notified when
@


1.14.2.11
log
@Indicate the correct path to make.conf in RELENG_4

PR:		docs/49014
Submitted by:	George Hartzell <hartzell@@kestrel.alerce.com>
Approved by:	re (murray)
@
text
@d78 1
a78 1
/etc/defaults/make.conf.
@


1.14.2.12
log
@MFC the applicable part of 1.31.
@
text
@d442 1
a442 1
Can't remember if you've installed a certain port or not? Try "pkg_info |
d455 1
a455 1
Need to quickly empty a file? Use ": > filename".
@


1.14.2.13
log
@Synch with -CURRENT.
@
text
@d78 1
a78 1
/usr/share/examples/etc/defaults/make.conf.
d134 1
a134 1
If you accidentally end up inside vi, you can quit it by pressing Escape, colon 
d139 1
a139 1
Bourne shell style, as in /bin/sh, bash, ksh, and zsh):
d154 1
a154 1
In order to support national characters for European languages in tools like
d446 3
d472 4
d479 1
a479 1
sh (the default Bourne shell in FreeBSD) supports command-line editing.  Just
a503 7
%
To obtain a neat PostScript rendering of a manual page, use ``-t'' switch
of the man(1) utility: ``man -t <topic>''.  For example:

	man -t grep > grep.ps	# Save the PostScript version to a file
or
	man -t printf | lp	# Send the PostScript directly to printer
@


1.14.2.14
log
@Switch importer
@
text
@d2 1
a2 1
$FreeBSD: stable/4/games/fortune/datfiles/freebsd-tips 127631 2004-03-30 18:48:03Z des $
@


1.13
log
@Remove two duplicate tips and correct formatting of an attribution.
@
text
@d2 1
a2 1
$FreeBSD: src/games/fortune/datfiles/freebsd-tips,v 1.12 2001/06/25 21:05:55 brian Exp $
d95 1
a95 1
locate uses a database that is updated every saturday (assuming your computer
d310 1
a310 1
You can make a log of you terminal session with script(1). 
@


1.12
log
@What to do when :w tells you you haven't got permission.
@
text
@d2 1
a2 1
$FreeBSD: src/games/fortune/datfiles/freebsd-tips,v 1.11 2001/06/25 20:45:52 brian Exp $
a132 7
If you accidently drop into /bin/sh (e.g, due to a computer failure where you
end up in single user mode), you can make the cursor keys work by typing

	set -E

The E represents the initial E in Emacs (for emacs keys).
%
d251 1
a251 1
		-- 	-- Konstantinos Konstantinidis <kkonstan@@duth.gr>
a257 4
		-- David Scheidt <dscheidt@@tumbolia.com>
%
man -k "something" will give you a list of manpages that have "something"
in their description.
@


1.11
log
@Mention that sh supports command line editing
@
text
@d2 1
a2 1
$FreeBSD: src/games/fortune/datfiles/freebsd-tips,v 1.10 2001/06/25 20:44:03 brian Exp $
d490 7
@


1.10
log
@Mention that vi supports split-screen mode.
@
text
@d2 1
a2 1
$FreeBSD: src/games/fortune/datfiles/freebsd-tips,v 1.9 2001/06/25 20:41:42 brian Exp $
d487 3
@


1.9
log
@Suggest using .login/.profile to set environment variables, not
.cshrc/.bashrc/.zshrc/.shrc
@
text
@d2 1
a2 1
$FreeBSD: src/games/fortune/datfiles/freebsd-tips,v 1.8 2001/06/20 20:14:36 mph Exp $
d484 3
@


1.8
log
@"Unmount" is spelled "umount", not "unmount".
@
text
@d2 1
a2 1
$FreeBSD: src/games/fortune/datfiles/freebsd-tips,v 1.7 2001/06/19 16:46:58 nik Exp $
d117 3
a119 4
depending on the shell - csh and tcsh uses .cshrc, bash uses .bashrc, zsh uses
.zshenv, ksh uses .kshrc, and the Bourne shell (/bin/sh) uses .profile (and
through a little bit of trickery in .profile also .shrc)
Other shells will often also read .profile
@


1.7
log
@Fix a couple of tips, and add a new one.

Submitted by:	Alexey V. Neyman <avn@@any.ru>
@
text
@d2 1
a2 1
$FreeBSD: src/games/fortune/datfiles/freebsd-tips,v 1.6 2001/06/19 05:46:30 dd Exp $
d203 1
a203 1
will be available under /cdrom/.  Remember to do 'unmount /cdrom' before
@


1.6
log
@Correct some typos.

PR:		28251
Submitted by:	Alex Kapranoff <alex@@kapran.bitmcnit.bryansk.su>
@
text
@d2 1
a2 1
$FreeBSD: src/games/fortune/datfiles/freebsd-tips,v 1.5 2001/06/16 16:45:52 nik Exp $
a372 6
Need to find the information that was displayed on your screen at boot 
time? Try 

	more /var/run/dmesg.boot
		-- Dru <genesis@@istar.ca>
% 
d402 1
a402 6
Want to save your login session to a file? Type "script filename" to 
record your session. When you are finished, hold down the control key and 
press d. 
		-- Dru <genesis@@istar.ca>
% 
Need to find the location of a program? Use "locate -b program_name". 
d449 1
a449 1
"sockstat -4". 
d470 1
a470 1
	ls -RC / |more
d479 1
a479 1
	grep address /var/run/dmesg.boot
d481 4
@


1.5
log
@More tips.  I'd never heard of look(1) before.

Submitted by:	Dru <genisis@@istar.ca>
@
text
@d2 1
a2 1
$FreeBSD: src/games/fortune/datfiles/freebsd-tips,v 1.4 2001/06/16 11:42:28 nik Exp $
d118 1
a118 1
.zshrc, ksh uses .kshrc, and the Bourne shell (/bin/sh) uses .profile (and
d388 1
a388 1
	man name_of_manpage | col -bx > lpr
@


1.4
log
@More tips, this time from the Russian Fidonet FreeBSD Echo.

And I never knew about ports(7) before.

Submitted by:	Alexey V. Neyman <avn@@any.ru>
@
text
@d2 1
a2 1
$FreeBSD: src/games/fortune/datfiles/freebsd-tips,v 1.3 2001/06/15 18:23:44 eivind Exp $
d333 159
@


1.3
log
@De-credit myself in order to be consistent.
Also add a few more tips while I am here.
@
text
@d2 1
a2 1
$FreeBSD: src/games/fortune/datfiles/freebsd-tips,v 1.2 2001/06/15 10:47:30 nik Exp $
d321 12
@


1.2
log
@More tips.

Submitted by:	David Scheidt <dscheidt@@tumbolia.com>
@
text
@d2 1
a2 1
$FreeBSD: src/games/fortune/datfiles/freebsd-tips,v 1.1 2001/06/15 08:45:43 nik Exp $
a96 1
		--  Eivind Eklund <eivind@@FreeBSD.org>
a103 1
		--  Eivind Eklund <eivind@@FreeBSD.org>
a109 1
		--  Eivind Eklund <eivind@@FreeBSD.org>
a113 1
		--  Eivind Eklund <eivind@@FreeBSD.org>
a120 1
		--  Eivind Eklund <eivind@@FreeBSD.org>
a132 1
		--  Eivind Eklund <eivind@@FreeBSD.org>
a139 1
		--  Eivind Eklund <eivind@@FreeBSD.org>
a143 1
		--  Eivind Eklund <eivind@@FreeBSD.org>
a147 1
		--  Eivind Eklund <eivind@@FreeBSD.org>
a151 1
		--  Eivind Eklund <eivind@@FreeBSD.org>
a154 1
		--  Eivind Eklund <eivind@@FreeBSD.org>
a171 1
		--  Eivind Eklund <eivind@@FreeBSD.org>
a175 1
		--  Eivind Eklund <eivind@@FreeBSD.org>
a179 1
		--  Eivind Eklund <eivind@@FreeBSD.org>
a189 1
		--  Eivind Eklund <eivind@@FreeBSD.org>
a195 1
		--  Eivind Eklund <eivind@@FreeBSD.org>
a199 1
		--  Eivind Eklund <eivind@@FreeBSD.org>
a207 1
		--  Eivind Eklund <eivind@@FreeBSD.org>
a225 1
		-- Eivind Eklund <eivind@@FreeBSD.org>
d284 37
@


1.1
log
@Add a new category of fortunes, 'freebsd-tips'.  Useful hints, advice, and
pointers to areas of the system that might not be apparent on first
inspection.
@
text
@d2 1
a2 1
$FreeBSD$
d279 24
@

