Marius van Witzenburg

Life can be so beautiful, if you have a wide vision.

Menu
  • Home
  • FreeBSD
  • How to
  • FAQ
  • Projects
  • Tools
  • My Likes

Display Jail IDs of Processes on a Machine With ps

By mariusvw
|
December 16, 2017
| No Comments
| FreeBSD, FreeBSD world

You can display Jail IDs of all processes on a machine with ps command and jid option:

1
ps -o pid,jid -awux

Read More »

Posted in %1$s Tagged %1$s Leave a comment

How to set hostname in Mac OS X with scutil

By mariusvw
|
October 21, 2017
| No Comments
| How to

The manpage is kind of self explaining, send me a message if you need some more help.   The commands I used:

1
2
3
scutil --set HostName phaser.local
scutil --get LocalHostName phaser
scutil --get ComputerName Phaser

man scutil Manage system configuration parameters.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
Syntax
   Interface to the [raw] stored preference data:
      scutil --prefs [preference-file]
 
   Check the network reachability of a host, IP address, or a pair of local and remote IP addresses:
      scutil -r [-W] { nodename | address | local-address remote-address }
 
   Check for (and optionally wait for the creation of or posting of a notification to) a dynamic store key:
      scutil -w dynamic-store-key [-t timeout]
 
   Report and update a select group of persistent system preferences, e.g. Hostname:
      scutil --get pref
      scutil --set pref [newval]
 
   Report the current DNS configuration:
      scutil --dns
 
   Report the current system proxy configuration:
      scutil --proxy
 
   Commands for monitoring and interacting with VPN connections:
      scutil --nc nc-arguments
 
   Interactive command line interface to the "dynamic store" data:
   type help for commands (maintained by configd)
      scutil
 
Key
   -r [-W] { nodename | address | local-address remote-address }
      Check the network reachability of the specified host name, IP
      address, or a pair of local and remote IP addresses.  One or more of
      the following strings will be reported to standard output.
 
      Not Reachable         The specified nodename/address cannot be
                            reached using the current network configuration.
 
      Reachable             The specified nodename/address can be reached
                            using the current network configuration.
 
      Transient Connection  The specified nodename/address can be reached
                            via a transient (e.g. PPP) connection.
 
      Connection Required   The specified nodename/address can be reached
                            using the current network configuration but a
                            connection must first be established.  As an
                            example, this status would be returned for a
                            dialup connection that was not currently active
                            but could handle network traffic for the target
                            system.
 
      Connection Automatic  The specified nodename/address can be reached
                            using the current network configuration but a
                            connection must first be established.  Any
                            traffic directed to the specified name/address
                            will initiate the connection.
 
      Local Address         The specified nodename/address is one associated
                            with a network interface on the system.
 
      Directly Reachable Addresss
                            Network traffic to the specified node-
                            name/address will not go through a gateway but
                            is routed directly to one of the interfaces on
                            the system.
 
      The reachability can also be monitored by specifying the -W (watch)
      option.  This will result in the current status being reported as
      well as the status when/if the network configuration changes.
 
      A zero exit status will be returned when the reachability status is
      reported correctly.  A non-zero exit status will be returned if
      errors are detected with an error reported to standard error.
 
   -w dynamic-store-key [-t timeout]
      Check if the specified key exists in the "dynamic store" data main-
      tained by configd(8).  If present, scutil will return with a zero
      exit status.  If not present, scutil will wait for the specified time
      for data to be associated with or a notification to be posted using
      the key.  A non-zero exit status will be returned if the key was not
      created/posted within the specified time.
 
      scutil will wait indefinitely if a timeout of 0 seconds is specified.
      The default timeout is 15 seconds.
 
   --get pref
      Retrieves the specified preference.  The current value will be
      reported on standard output.
 
      Supported preferences include:
 
            ComputerName   The user-friendly name for the system.
 
            LocalHostName  The local (Bonjour) host name.
 
            HostName       The name associated with hostname(1) and
                           gethostname(3).
 
   --set pref [newval]
      Updates the specified preference with the new value.  If the new
      value is not specified on the command line then it will be read from
      standard input.
 
      Supported preferences include: ComputerName LocalHostName HostName
 
      The --set option requires super-user access.
 
   --dns
      Reports the current DNS configuration.
 
   --proxy
      Reports the current proxy configuration.
 
   --nc nc-arguments
      Provides a set of commands for monitoring and interacting with VPN
      connections. Use --nc help for a full list of commands.

Examples Display the current hostname, localhost name and computername

1
2
3
scutil --get HostName
scutil --get LocalHostName
scutil --get ComputerName

Change the primary hostname of the computer to cedric.local (local) or cedric.ss64.com (fully qualified)

1
2
sudo scutil --set HostName cedric.local
sudo scutil --set HostName cedric.ss64.com

[…]

Read More »

Posted in %1$s Tagged %1$s Leave a comment

How to Rebuild Launchpad Database in OS X Yosemite (10.10) and Later

By mariusvw
|
October 21, 2017
| No Comments
| How to

When you run into the situation the icons are weird sorted or like in my situation having folders with items in it when closed but as soon you open the folder the items disappear, you might want to start over and reset the Launchpad. Launch Terminal, located in the /Applications/Utilities folder. In the Terminal window, […]

Read More »

Posted in %1$s Tagged %1$s Leave a comment

Wine and beer rack from pallet wood

By mariusvw
|
September 7, 2017
| No Comments
| Projects

Everybody likes a drink one in a while, but how nice would it be to have a place where to have your drinks including glasses stored and be able to see what you have in stock.   A nice way, a rack made out of pallet wood.   Requirements to create this: Drill 3mm Drilling […]

Read More »

Posted in %1$s Tagged %1$s Leave a comment

How to resize/grow a VMware or Virtualbox disk

By mariusvw
|
March 1, 2017
| No Comments
| How to

So you created a virtual machine… And after a month you notice that you run low on disk space… If you have disk space left on your host machine you can grow the disk and then let the running guest OS resize it to the new given size. This action requires VirtualBox to be installed. […]

Read More »

Posted in %1$s Tagged %1$s Leave a comment

How to disable or enable SIP on Mac OS X

By mariusvw
|
February 10, 2017
| No Comments
| How to

In Mac OS X El Capitan, Apple added SIP (System Integrity Protection), previously referred to as rootless mode in the beta releases. SIP is essentially just a block on editing the /System, /sbin, and /usr directories (with the exception of the /usr/local subdirectory). It is recommend keeping SIP enabled whenever possible, so enable it again after you have finished making changes, unless an application […]

Read More »

Posted in %1$s Tagged %1$s Leave a comment

How to remove the password from a user account on FreeBSD

By mariusvw
|
January 22, 2017
| No Comments
| FreeBSD, How to

Default for most accounts I create I use SSH keys, therefore I do not want accounts to have a password set. Instead of leaving the password blank it is better to disable logging in using a password. This can be done with the following command:

1
pw mod user "$USERNAME" -w no

You can check the result with vipw For example, […]

Read More »

Posted in %1$s Tagged %1$s Leave a comment

How to test the Spammyness of your Emails with mail-tester.com

By mariusvw
|
November 26, 2016
| No Comments
| How to

When sending newsletters or mails from a webshop or any other automated service, you want to be sure that your mail has a good chance of being received correctly at the recipient. You don’t want your email to be marked as spam or even worse being trashed due high spam probability.   To test this, […]

Read More »

Posted in %1$s Tagged %1$s Leave a comment

How to remove the trailing slash from a URL using Apache or Nginx

By mariusvw
|
November 23, 2016
| No Comments
| How to

This tutorial explains how to rewrite urls having a trailing slash to an url without the trailing slash. Apache Using Apache we have two options, set the rewrites in a .htaccess (slower) file or in the vhost configuration. .htaccess Add the highlighted lines to your .htaccess file, keep in mind that the position is important. […]

Read More »

Posted in %1$s Tagged %1$s Leave a comment

How to use the profiles command in Mac OS X Sierra

By mariusvw
|
November 23, 2016
| No Comments
| How to

ou might be happy to note that other than the ability to interpret new payloads, the profiles command mostly stays the same in Sierra. You can still export profiles from Apple Configurator or Profile Manager (or some of the 3rd party MDM tools). You can then install profiles by just opening them and installing. Once […]

Read More »

Posted in %1$s Tagged %1$s Leave a comment

Posts navigation

1 2 … 10 Next

Social

Search

Archives

  • December 2017
  • October 2017
  • September 2017
  • March 2017
  • February 2017
  • January 2017
  • November 2016
  • October 2016
  • February 2016
  • December 2015
  • March 2015
  • January 2015
  • November 2013
  • July 2013
  • May 2013
  • March 2013
  • February 2013
  • January 2013
  • December 2012
  • November 2012
  • October 2012
  • September 2012
  • December 2011
  • November 2011
  • July 2011
  • June 2011
  • September 2010
  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • January 2010

Categories

  • Development
  • FAQ
  • FreeBSD
  • FreeBSD world
  • Funny
  • How to
  • Projects

FreeBSD

Proud Donor

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

Social

Search

Archives

  • December 2017
  • October 2017
  • September 2017
  • March 2017
  • February 2017
  • January 2017
  • November 2016
  • October 2016
  • February 2016
  • December 2015
  • March 2015
  • January 2015
  • November 2013
  • July 2013
  • May 2013
  • March 2013
  • February 2013
  • January 2013
  • December 2012
  • November 2012
  • October 2012
  • September 2012
  • December 2011
  • November 2011
  • July 2011
  • June 2011
  • September 2010
  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • January 2010

Categories

  • Development
  • FAQ
  • FreeBSD
  • FreeBSD world
  • Funny
  • How to
  • Projects

FreeBSD

Proud Donor

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

Powered by WordPressMarius van Witzenburg 2019 | All Rights Reserved.