Home arrow Journal
Journal
Find what package installs c++filt PDF
Wednesday, 09 March 2016
I want to install c++filt but I don't know to which package it belongs to. Luckily I have other sistem where c++filt is installed so I will log in to that system and type:

  # whereis c++filt
c++filt: /usr/local/bin/c++filt /usr/local/man/man1/c++filt.1.gz /usr/src/gnu/usr.bin/cc/c++filt

  # pkg which /usr/local/bin/c++filt 
/usr/local/bin/c++filt was installed by package binutils-2.25.1

So c++filt is in binutils package. Now, let's install it on the other machine:

  # pkg install binuils

 
See what version of FreeBSD is on your machine PDF
Saturday, 09 January 2016
You can see the version of FreeBSD reported by your kernel with uname -a but what if you want to see the version and the patchlevel of your machine? In that case you can use freebsd-version command:

  # freebsd-version

10.2-RELEASE-p8

 
Add a directory to your path of your FreeBSD shell PDF
Saturday, 15 August 2015
To add a path to your FreeBSD /bin/sh shell edit your ~/.shrc (or ~/.profile) file and add the following line:

  export PATH=$PATH:$HOME/.composer/vendor/bin:

Previous line will add ~/.composer/vendor/bin to your $PATH.

To check your new path, re-login to your sh shell and run:

  echo $PATH

To add a path to your csh or tcsh shell add the following line to your ~/.cshrc 

  set path = ($path $HOME/.composer/vendor/bin)

Notes: 
- To add your path to bash you need to edit ~/.bash_profile
- export command will work with sh, ksh, bash. 
- set command (or setenv) will work with csh or tcsh.

Last Updated ( Saturday, 15 August 2015 )
 
Disable (lock) a system user in FreeBSD PDF
Friday, 26 June 2015
To disable a system user in FreeBSD we will use pw command:

  pw lock john

Previous command will lock login access to user john.

 
Configure Wifi Card in FreeBSD with Static IP PDF
Monday, 22 June 2015
In order to configure your wifi card with a static IP add the following lines to /etc/rc.conf:

/etc/rc.conf
wlans_ath0="wlan0"
ifconfig_wlan0="WPA inet 192.168.1.10 netmask 0xffffff00"
defaultrouter="192.168.1.1"

 Also don't forget to add your dns server in /etc/resolv.conf file.

Last Updated ( Monday, 22 June 2015 )
 
Redirect Stderr in csh Shell PDF
Sunday, 12 April 2015
If you want to redirect only stderr to a file or to /dev/null when working with csh shell this is how you do it:

( pfctl -t blocklist -Tshow > /dev/tty ) > & /dev/null

 
Install MariaDB in FreeBSD PDF
Saturday, 11 April 2015
Here is a quick how to install MariaDB in FreeBSD:

Install MariaDB FreeBSD package from FreeBSD repository:

  pkg install mariadb100-server

Add a line in /etc/rc.conf to start MariaDB server at boot:

  mysql_enable="YES"

Start the service:

  service mysql-server start

 
Remove Read Write and Execute from Others on Files in FreeBSD PDF
Wednesday, 08 April 2015
If you want to remove rights for others to write, execute or read files in a directory run:

  chmod o-rwx *

If you want to remove read write and execute rights to files for group owner of those files run:

  chmod u-rwx *

 
Delete Hidden Directories in FreeBSD PDF
Tuesday, 24 March 2015
If you want to delete directories that start with . (some calls is hidden directories) you can use -d rm flag:

  rm -rfd *

 
An App for Listening Music from Xorg Desktop in FreeBSD PDF
Sunday, 15 March 2015
There are still XMMS and XMMS2 in ports but are not maintain anymore. An app based on XMMS that does the job is audacius. We'll install it from FreeBSD packages:

  pkg install audacious
  pkg install audacious-plugins

Then we can run audacious from command line.

 
Scan a Local Network for Hosts PDF
Friday, 06 February 2015
Let's say we added some hosts on our local network and we forgot the IP of those hosts. We don't want to hook up a monitor to see what IP are configured for those hosts but we need to know the IP if we want to remotely log to those machines. To scan our /24 subnet for hosts and see their IP addresses we will use nmap. First we will install nmap in FreeBSD:

  cd /usr/ports/security/nmap
  make install clean

Then we will use nmap to scan for hosts:

  nmap -sP 10.0.0.0/24

 
More...

Other BSD Systems

OpenBSD

Misc

Solaris

Polls

Best BSD firewall?