You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ad...@apache.org on 2017/04/26 00:51:19 UTC

[08/12] incubator-mynewt-site git commit: Documentation on how to install newt and newtmgr from debian package

Documentation on how to install newt and newtmgr from debian package


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/commit/2fa19db1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/tree/2fa19db1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/diff/2fa19db1

Branch: refs/heads/develop
Commit: 2fa19db1d48a6c96c2562e15dd4cf9614698f309
Parents: 6f5c827
Author: cwanda <wa...@happycity.com>
Authored: Tue Apr 25 13:46:40 2017 -0700
Committer: cwanda <wa...@happycity.com>
Committed: Tue Apr 25 13:46:40 2017 -0700

----------------------------------------------------------------------
 docs/newt/install/newt_linux.md | 305 ++++++++++++++++++++---------------
 docs/newtmgr/install_linux.md   | 214 +++++++++++++++++++-----
 2 files changed, 356 insertions(+), 163 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/2fa19db1/docs/newt/install/newt_linux.md
----------------------------------------------------------------------
diff --git a/docs/newt/install/newt_linux.md b/docs/newt/install/newt_linux.md
index a2c1671..5956496 100644
--- a/docs/newt/install/newt_linux.md
+++ b/docs/newt/install/newt_linux.md
@@ -1,55 +1,109 @@
-## Install newt tool on Linux
+## Installing Newt on Linux
+
+You can install the latest stable release (1.0.0) of newt from a Debian binary package (amd64) or from a Debian source package. This page shows you how to:
+
+1. Set up your computer to retrieve Debian packages from the runtimeco debian package repository.
+2. Install the latest stable release version of newt from a Debian binary package. 
+3. Install the latest stable release version of newt from a Debian source package.
+
+If you are running on an amd64 platform, we recommend that you install from the binary package.
+
+**Note:** See [Setting Up an Go Environment to Contribute to Newt and Newtmgr Tools](/faq/go_env) if you want to:  
+
+* Use the newt tool with the latest updates from the master branch. The master branch may be unstable and we recommend that you use the latest stable release version.
+* Contribute to the newt tool. 
 
 <br>
 
-### Getting your Linux box Ready 
+### Setting Up Your Computer to Get Packages from runtimeco 
+The newt Debian packages are stored in a private repository on **https://github/runtimeco/debian-mynewt**. 
+
+**Note:** You will only need to perform these steps only once on your computer.
+The following steps must be performed on your computer:
 
-If you want to build the *newt* tool from its source code, follow the following steps:
+1. Add the `apt-transport-https` package to use HTTPS to retrieve packages. 
+2. Download the public key for the runtimeco debian repository and import the key into the apt keychain.
+3. Add the repository for the binary and source packages to the apt source list.
 
-#### 1. Install git, libcurl
 
+<br>
+Add the apt-transport-https package:
+```no-highlight
+$sudo apt-get update
+$sudo apt-get install apt-transport-https
 ```
-        $ sudo apt-get install git 
-        $ sudo apt-get install libcurl4-gnutls-dev 
+<br>
+
+
+Download the public key for the runtimeco apt repo (**Note:** There is  `-` after the add):
+
+```no-highlight
+wget -qO - https://raw.githubusercontent.com/runtimeco/debian-mynewt/master/mynewt.gpg.key | sudo apt-key add -
 ```
+<br>
 
-**NOTE:** On 64-bit host, you may also need to install gcc-multilib, if you encounter compilation errors related to 'sys/cdefs.h'
+Add the repository for the binary and source packages to the apt source list:
 
+```no-highlight
+$sudo -s
+[sudo] password for <user>:
+root$ cat > /etc/apt/sources.list.d/mynewt.list <<EOF
+deb https://raw.githubusercontent.com/runtimeco/debian-package/master latest main
+deb-src https://raw.githubusercontent.com/runtimeco/debian-package/master latest main
+EOF
+```
 <br>
+Check the content of the file:
+
+```no-highlight
+root$more /etc/apt/sources.list.d//mynewt.list
+deb https://raw.githubusercontent.com/runtimeco/debian-package/master latest main
+deb-src https://raw.githubusercontent.com/runtimeco/debian-package/master latest main
+```
+<br> 
 
-#### 2. Install Go, the programming language
+Exit the root shell:
 
-* Go language environment dictates a directory structure. Known in Go parlance as a workspace, it must contain three sibling directories with the directory names src, pkg and bin, as explained below. 
+```no-highlight
+root$exit
+```
+<br>
+### Installing the Latest Release of Newt from a Binary Package 
 
-    * src contains Go source files organized into packages (one package per directory),
+For Linux amd64 platform, you can install the latest stable version (1.0.0) of newt from the newt Debian binary package:
 
-    * pkg contains package objects, and
+```no-highlight
+$sudo apt-get update
+$sudo apt-get install newt
+Reading package lists... Done
+Building dependency tree       
+Reading state information... Done
 
-    * bin contains executable commands.
+      ...
 
-    The GOPATH environment variable specifies the location of your workspace. To setup this workspace environment, create a 'dev' directory and then a 'go' directory under it. Set the GOPATH environment variable to this directory where you will soon clone the *newt* tool repository.
-    
-```
-        $ cd $HOME
-        $ mkdir -p dev/go  
-        $ cd dev/go
-        $ export GOPATH=`pwd`
+Preparing to unpack .../newt_1.0.0-1_amd64.deb ...
+Unpacking newt (1.0.0-1) ...
+Setting up newt (1.0.0-1) ...
 ```
-  (Note that you need to add export statements to ~/.bash_profile to export variables permanently. Don't forget to source the file for the change to go into effect.)
+<br>
+See [Checking the Installed Version of Newt](#check) to verify that you are using the installed version of newt.
 
 <br>
+### Installing the Latest Stable Release of Newt from a Source Package 
 
-```
-        $ vi ~/.bash_profile
-        $ source ~/.bash_profile
-```
+If you are running Linux on a different architecture, you can install the Debian source package for the latest stable release (1.0.0) of newt. The installation of the source package builds the newt binary and creates a Debian binary package that you then install.
+
+**Note**: Newt version 1.0.0 has been tested on Linux amd64 platform. Version 1.0.0 does not build on the 32 bit platform but have been fixed for the next release.
+
+<br>
+#### Installing Go 1.7 
+
+You need Go version 1.7 or higher to build Newt version 1.0.0.  Currently, the latest Go version that Ubuntu installs is 1.6.  Run `go version` to check if you have Go 1.7 installed. 
 
 <br>
 
-* Next, install Go. When installed, Go offers you as a developer a language environment (to compile Go code), construct Go packages (to assemble Go packages) and import Go code (from github). In the next step, you will use the Go commands to import *newt* repo into your local Go environment.
+Install Go version 1.7:
 
-    **Note**: The Newt tool requires Go version 1.7 or later.  Currently, the latest Go version that Ubuntu installs is 1.6. You can run `apt-get install golang-1.7-go` to install version 1.7. You can also download version 1.7 from [https://golang.org/dl/](https://golang.org/dl/). 
-   
 ```no-highlight
 $sudo apt-get install golang-1.7-go
 Reading package lists... Done
@@ -57,126 +111,123 @@ Reading package lists... Done
 Unpacking golang-1.7-go (1.7.1-2ubuntu1) ...
 Setting up golang-1.7-go (1.7.1-2ubuntu1) ...
 $
-$sudo ln -s /usr/lib/go-1.7/bin/go /usr/bin/go
+$sudo ln -sf ../lib/go-1.7/bin/go /usr/bin/go
 $go version
 go version go1.7.1 linux/amd64
 ```
-
-<br>    
-
-#### 3. Create local repository
-
-* Use Go commands to copy the directory (currently the ASF incubator directory). Be patient as it may take a minute or two. Check the directories installed.
-
-```no-highlight
-        $ go get mynewt.apache.org/newt/...
-```
+You can also download version 1.7 from [https://golang.org/dl/](https://golang.org/dl/). 
 
 <br>
+#### Installing from the Source Package
+Create a directory and change into the directory, download the source package, and build a binary package from the source package:
 
-* Check that newt.go is in place.
 ```no-highlight
-        $ ls $GOPATH/src/mynewt.apache.org/newt
-        DISCLAIMER	NOTICE		newt		newtvm      viper
-        LICENSE		README.md	newtmgr		util        yaml
+mkdir newt_source
+$cd newt_source
+$sudo apt-get --build source newt
+[sudo] password for <user>: 
+Reading package lists... Done
+Need to get 1,866 kB of source archives.
+Get:1 https://raw.githubusercontent.com/runtimeco/debian-mynewt/master latest/main newt 1.0.0-1 (dsc) [795 B]
+Get:2 https://raw.githubusercontent.com/runtimeco/debian-mynewt/master latest/main newt 1.0.0-1 (tar) [1,864 kB]
+Get:3 https://raw.githubusercontent.com/runtimeco/debian-mynewt/master latest/main newt 1.0.0-1 (diff) [2,000 B]
+Fetched 1,866 kB in 1s (1,222 kB/s)
+dpkg-source: warning: extracting unsigned source package (newt_1.0.0-1.dsc)
+dpkg-source: info: extracting newt in newt-1.0.0
+dpkg-source: info: unpacking newt_1.0.0.orig.tar.gz
+dpkg-source: info: unpacking newt_1.0.0-1.debian.tar.xz
+
+           ...
+
+dpkg-deb: building package 'newt' in '../newt_1.0.0-1_amd64.deb'.
+ dpkg-genchanges --build=any,all >../newt_1.0.0-1_amd64.changes
+dpkg-genchanges: info: binary-only upload (no source code included)
+ dpkg-source --after-build newt-1.0.0
+dpkg-buildpackage: info: binary-only upload (no source included)
+W: Can't drop privileges for downloading as file 'newt_1.0.0-1.dsc' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
 ```
+**Note:** You can ignore the "Permission denied: warning message at the end of the command.
 
 <br>
-
-#### 4. Build the Newt tool
-
-* Use Go to run the newt.go program to build the *newt* tool. The command `go install` compiles and writes the resulting executable to an output file named `newt`, which is then installed, along with its dependencies, in $GOPATH/bin. If you get errors it is likely because of path resolution issues. Try `go build`  followed by `go install` in that case.
+Install the newt binary package that is created from the source package:
 
 ```no-highlight
-        $ cd $GOPATH/src/mynewt.apache.org/newt/newt
-        $ go install
-        $ ls "$GOPATH"/bin/
-        newt newtmgr newtvm
+$sudo dpkg -i newt_1.0.0-1_amd64.deb 
+Selecting previously unselected package newt.
+(Reading database ... 252969 files and directories currently installed.)
+Preparing to unpack newt_1.0.0-1_amd64.deb ...
+Unpacking newt (1.0.0-1) ...
+Setting up newt (1.0.0-1) ...
 ```
-
 <br>
+###<a name="check"></a> Checking the Installed Version of Newt
+After you have installed newt from either a Debian binary or source package, check that you are using the installed version of newt from **/usr/bin**. 
 
-* At this point, you can try using *newt*. For example, check for the version number by typing 'newt version'. See all the possible commands available to a user of newt by typing 'newt -h'.
+Check the modification time of the binary and the newt tool that you are using:
 
-   (Note: If you are going to be modifying the *newt* often and going to be compile the program every time you call it, you will want to store the command in a variable in your .bash_profile. So type in `export newt="go run $GOPATH/mynewt.apache.org/newt/newt/newt.go"` in your .bash_profile and execute it by calling `$newt` at the prompt instead of `newt`. Essentially, `$newt` calls `go run` which runs the compiled binary directly without producing an executable. Don't forget to reload the updated bash profile by typing `source ~/.bash_profile` at the prompt! )
-   
 ```no-highlight
-        $ newt version
-        Newt version:  1.0
-        $ newt -h
-        Newt allows you to create your own embedded application based on the Mynewt 
-        operating system. Newt provides both build and package management in a single 
-        tool, which allows you to compose an embedded application, and set of 
-        projects, and then build the necessary artifacts from those projects. For more 
-        information on the Mynewt operating system, please visit 
-        https://mynewt.apache.org/. 
-
-        Please use the newt help command, and specify the name of the command you want 
-        help for, for help on how to use a specific command
-
-        Usage:
-          newt [flags]
-          newt [command]
-
-        Examples:
-          newt
-          newt help [<command-name>]
-            For help on <command-name>.  If not specified, print this message.
-
-        Available Commands:
-          build        Build one or more targets
-          clean        Delete build artifacts for one or more targets
-          create-image Add image header to target binary
-          debug        Open debugger session to target
-          info         Show project info
-          install      Install project dependencies
-          load         Load built target to board
-          mfg          Manufacturing flash image commands
-          new          Create a new project
-          pkg          Create and manage packages in the current workspace
-          run          build/create-image/download/debug <target>
-          size         Size of target components
-          sync         Synchronize project dependencies
-          target       Commands to create, delete, configure, and query targets
-          test         Executes unit tests for one or more packages
-          upgrade      Upgrade project dependencies
-          vals         Display valid values for the specified element type(s)
-          version      Display the Newt version number
-
-        Flags:
-          -h, --help              Help for newt commands
-          -j, --jobs int          Number of concurrent build jobs (default 8)
-          -l, --loglevel string   Log level (default "WARN")
-          -o, --outfile string    Filename to tee output to
-          -q, --quiet             Be quiet; only display error output
-          -s, --silent            Be silent; don't output anything
-          -v, --verbose           Enable verbose output when executing commands
-
-        Use "newt [command] --help" for more information about a comma
+$ls -l /usr/bin/newt
+-rwxr-xr-x 1 root root 6919280 Apr 22 10:09 /usr/bin/newt
+$which newt
+/usr/bin/newt
+$newt version
+Apache Newt (incubating) version: 1.0.0
 ```
-<br>
 
-#### 5. Updating the Newt tool
-
-* You will update the newt tool in the same place as you initially installed the newt tool.
-* Start by updating the git repository of the newt tool (you can change to a different branch using git checkout [branch] if you need to)
-* Then update each of the tools newt, newtmgr and newtvm as needed
+**Note:** If you previously built newt from source and the output of `which newt` shows "$GOPATH/bin/newt", you will need to move "$GOPATH/bin" after "/usr/bin" in your $PATH and export your $PATH.
 
+<br>
+Get information about newt:
 ```no-highlight
-        $ cd $GOPATH/src/mynewt.apache.org/newt
-        $ git pull
-        $ cd newt
-        $ go install
-        $ cd ../newtmgr
-        $ go install
-        $ cd ../newtvm
-        $ go install
-        $ ls "$GOPATH"/bin/
-        newt newtmgr newtvm
+$newt
+Newt allows you to create your own embedded application based on the Mynewt
+operating system. Newt provides both build and package management in a single
+tool, which allows you to compose an embedded application, and set of
+projects, and then build the necessary artifacts from those projects. For more
+information on the Mynewt operating system, please visit
+https://mynewt.apache.org/.
+
+Please use the newt help command, and specify the name of the command you want
+help for, for help on how to use a specific command
+
+Usage:
+  newt [flags]
+  newt [command]
+
+Examples:
+  newt
+  newt help [<command-name>]
+    For help on <command-name>.  If not specified, print this message.
+
+Available Commands:
+  build        Build one or more targets
+  clean        Delete build artifacts for one or more targets
+  create-image Add image header to target binary
+  debug        Open debugger session to target
+  info         Show project info
+  install      Install project dependencies
+  load         Load built target to board
+  mfg          Manufacturing flash image commands
+  new          Create a new project
+  pkg          Create and manage packages in the current workspace
+  run          build/create-image/download/debug <target>
+  size         Size of target components
+  sync         Synchronize project dependencies
+  target       Commands to create, delete, configure, and query targets
+  test         Executes unit tests for one or more packages
+  upgrade      Upgrade project dependencies
+  vals         Display valid values for the specified element type(s)
+  version      Display the Newt version number
+
+Flags:
+  -h, --help              Help for newt commands
+  -j, --jobs int          Number of concurrent build jobs (default 8)
+  -l, --loglevel string   Log level (default "WARN")
+  -o, --outfile string    Filename to tee output to
+  -q, --quiet             Be quiet; only display error output
+  -s, --silent            Be silent; don't output anything
+  -v, --verbose           Enable verbose output when executing commands
+
+Use "newt [command] --help" for more information about a command.
 ```
-
-That should have updated your newt, newtmgr and newtvm to the latest versions based on the git repository you used.
-
 <br>
-
-

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/2fa19db1/docs/newtmgr/install_linux.md
----------------------------------------------------------------------
diff --git a/docs/newtmgr/install_linux.md b/docs/newtmgr/install_linux.md
index faece9f..9badcc9 100644
--- a/docs/newtmgr/install_linux.md
+++ b/docs/newtmgr/install_linux.md
@@ -1,15 +1,118 @@
+## Installing Newtmgr on Linux
 
-# Installing Newtmgr on Linux
+You can install the latest stable release (1.0.0) of newtmgr from a Debian binary package (amd64) or from a Debian source package. This page shows you how to:
 
-This page shows you how to install newtmgr from source code on Linux.
+1. Set up your computer to retrieve Debian packages from the runtimeco debian package repository. 
 
-### Install Go (golang)
+    **Note:** You can skip this step if you already set up your computer to access the runtimeco debian repository when you installed the newt tool. 
 
-Install Go if it is not installed.  The Newtmgr tool version 1.0.0 requires Go version 1.7 or later.  Currently, the latest Go version that Ubuntu installs is
-1.6. You can run `apt-get install golang-1.7-go` to install version 1.7. You can also download version 1.7 from [https:/
-/golang.org/dl/](https://golang.org/dl/).
+2. Install the latest stable release version of newtmgr from a Debian binary package. 
+3. Install the latest stable release version of newtmgr from a Debian source package.
 
-```hl_lines="1 7"
+If you are running on an amd64 platform, we recommend that you install from the binary package.
+
+**Note:** See [Setting Up an Go Environment to Contribute to Newt and Newtmgr Tools](/faq/go_env) if you want to:  
+
+* Use the newtmgr tool with the latest updates from the master branch. The master branch may be unstable and we recommend that you use the latest stable release version.
+* Contribute to the newtmgr tool. 
+
+<br>
+
+### Setting Up Your Computer to Get Packages from runtimeco 
+
+The newtmgr Debian packages are stored in a private repository on **https://github/runtimeco/debian-mynewt**. 
+
+**Note**: You will only need to perform these steps once on your computer. You can skip this step if you already set up your computer to access the runtimeco debian repository when you installed the newt tool. 
+
+The following steps must be performed on your computer:
+
+1. Add the `apt-transport-https` package to use HTTPS to retrieve packages. 
+2. Download the public key for the runtimeco debian repository and import the key into the apt keychain.
+3. Add the repository for the binary and source packages to the apt source list.
+
+<br>
+Add the apt-transport-https package:
+```no-highlight
+$sudo apt-get update
+$sudo apt-get install apt-transport-https
+```
+<br>
+
+
+Download the public key for the runtimeco apt repo (**Note:** There is  `-` after the add):
+
+```no-highlight
+wget -qO - https://raw.githubusercontent.com/runtimeco/debian-mynewt/master/mynewt.gpg.key | sudo apt-key add -
+```
+<br>
+
+Add the repository for the binary and source packages to the apt source list:
+
+```no-highlight
+$sudo -s
+[sudo] password for <user>:
+root$ cat > /etc/apt/sources.list.d/mynewt.list <<EOF
+deb https://raw.githubusercontent.com/runtimeco/debian-package/master latest main
+deb-src https://raw.githubusercontent.com/runtimeco/debian-package/master latest main
+EOF
+```
+<br>
+Check the content of the file:
+
+```no-highlight
+root$more /etc/apt/sources.list.d//mynewt.list
+deb https://raw.githubusercontent.com/runtimeco/debian-package/master latest main
+deb-src https://raw.githubusercontent.com/runtimeco/debian-package/master latest main
+```
+<br> 
+
+Exit the root shell:
+
+```no-highlight
+root$exit
+```
+<br>
+### Installing the Latest Release of Newtmgr from a Binary Package 
+
+For Linux amd64 platform, you can install the latest stable version (1.0.0) of newtmgr from the newtmgr Debian binary package:
+
+```no-highlight
+$sudo apt-get update
+$sudo apt-get install newtmgr
+Reading package lists... Done
+Building dependency tree       
+Reading state information... Done
+The following NEW packages will be installed:
+  newtmgr
+0 upgraded, 1 newly installed, 0 to remove and 204 not upgraded.
+Need to get 0 B/2,312 kB of archives.
+After this operation, 11.5 MB of additional disk space will be used.
+Selecting previously unselected package newtmgr.
+(Reading database ... 211647 files and directories currently installed.)
+Preparing to unpack .../newtmgr_1.0.0-1_amd64.deb ...
+Unpacking newtmgr (1.0.0-1) ...
+Setting up newtmgr (1.0.0-1) 
+```
+<br>
+See [Checking the Installed Version of Newtmgr](#check) to verify that you are using the installed version of newtmgr.
+
+<br>
+### Installing the Latest Stable Release of Newtmgr from a Source Package 
+
+If you are running Linux on a different architecture, you can install the Debian source package for the latest stable release (1.0.0) of newtmgr. The installation of the source package builds the newtmgr binary and creates a Debian binary package that you then install.
+
+**Note**: Newtmgr version 1.0.0 has been tested on Linux amd64 platform. 
+
+<br>
+#### Installing Go 1.7 
+
+You need Go version 1.7 or higher to build Newtmgr version 1.0.0.  Currently, the latest Go version that Ubuntu installs is 1.6.  Run `go version` to check if you have Go 1.7 installed. 
+
+<br>
+
+Install Go version 1.7:
+
+```no-highlight
 $sudo apt-get install golang-1.7-go
 Reading package lists... Done
      ...
@@ -20,52 +123,91 @@ $sudo ln -sf ../lib/go-1.7/bin/go /usr/bin/go
 $go version
 go version go1.7.1 linux/amd64
 ```
-<br>
+You can also download version 1.7 from [https://golang.org/dl/](https://golang.org/dl/). 
 
-To use go, you must set a `$GOPATH` variable in your environment.  This tells
-go where to put all the packages it downloads, builds and runs.
+<br>
+#### Installing from the Source Package
+Create a directory and change into the directory, download the source package, and build a binary package from the source package:
 
 ```no-highlight
-$ mkdir $HOME/dev
-$ export GOPATH=$HOME/dev/Go
+mkdir newtmgr_source
+$cd newtmgr_source
+$sudo apt-get --build source newtmgr
+[sudo] password for <user>: 
+
+sudo apt-get --build source newtmgr
+Reading package lists... Done
+Need to get 1,867 kB of source archives.
+Get:1 https://raw.githubusercontent.com/runtimeco/debian-mynewt/master latest/main newtmgr 1.0.0-1 (dsc) [822 B]
+Get:2 https://raw.githubusercontent.com/runtimeco/debian-mynewt/master latest/main newtmgr 1.0.0-1 (tar) [1,864 kB]
+Get:3 https://raw.githubusercontent.com/runtimeco/debian-mynewt/master latest/main newtmgr 1.0.0-1 (diff) [2,372 B]
+Fetched 1,867 kB in 1s (1,767 kB/s) 
+
+           ...
+
+dpkg-deb: building package 'newtmgr' in '../newtmgr_1.0.0-1_amd64.deb'.
+ dpkg-genchanges --build=any,all >../newtmgr_1.0.0-1_amd64.changes
+dpkg-genchanges: info: binary-only upload (no source code included)
+ dpkg-source --after-build newtmgr-1.0.0
+dpkg-buildpackage: info: binary-only upload (no source included)
 ```
 
 <br>
+Install the newtmgr binary package that is created from the source package:
 
-Its best to add this to your `.profile` so its set automatically for your 
-environment. 
+```no-highlight
+$sudo dpkg -i newtmgr_1.0.0-1_amd64.deb 
 
+```
 <br>
+###<a name="check"></a> Checking the Installed Version of Newtmgr
+After you have installed newtmgr from either a Debian binary or source package, check that you are using the installed version of newtmgr from **/usr/bin**. 
 
-### Download the newtmgr source 
-
-You will first download the source code for newt.
+Check the modification time of the binary and the newtmgr tool that you are using:
 
 ```no-highlight
-go get mynewt.apache.org/newt/...
+$ls -l /usr/bin/newtmgr
+-rwxr-xr-x 1 root root 11473328 Apr 25 10:10 /usr/bin/newtmgr
+$which newtmgr
+/usr/bin/newtmgr
 ```
 
-<br>
-
-### Building newtmgr
+**Note:** If you previously built newtmgr from source and the output of `which newtmgr` shows "$GOPATH/bin/newtmgr", you will need to move "$GOPATH/bin" after "/usr/bin" in your $PATH and export your $PATH.
 
-Change into the directory where the newmgr tool was downloaded and 
-install the newtmgr tool
+<br>
+Get information about newtmgr:
 
 ```no-highlight
-$cd $GOPATH/src/mynewt.apache.org/newt/newtmgr
-$go install
-$ls $GOPATH/bin
-... newtmgr	...
+$newtmgr
+Newtmgr helps you manage remote devices running the Mynewt OS
+
+Usage:
+  newtmgr [flags]
+  newtmgr [command]
+
+Available Commands:
+  config      Read or write a config value on a device
+  conn        Manage newtmgr connection profiles
+  crash       Send a crash command to a device
+  datetime    Manage datetime on a device
+  echo        Send data to a device and display the echoed back data
+  fs          Access files on a device
+  image       Manage images on a device
+  log         Manage logs on a device
+  mpstats     Read memory pool statistics from a device
+  reset       Send reset request to a device
+  run         Run test procedures on a device
+  stat        Read statistics from a device
+  taskstats   Read task statistics from a device
+
+Flags:
+  -c, --conn string       connection profile to use
+  -h, --help              Help for newtmgr commands
+  -l, --loglevel string   log level to use (default "info")
+  -t, --trace             print all bytes transmitted and received
+
+Use "newtmgr [command] --help" for more information about a command.
 ```
 
+```
 <br>
-
-**Note:** If the `go install` command results in errors indicating some package 
-cannot be found, do a `go get` to download all the third-party files needed 
-from github.com and then run `go install` again. 
-
-### Add to your Path
-
-Add your `$GOPATH/bin` directory to your path.
-