<p>All commandline applications shipped with Haiku are in <spanclass="path">/boot/system/bin/</span>. Your own or additionally installed commandline apps will appear there as well, or in <spanclass="path">~/config/bin/</span>, when installed from a .hpkg package. Otherwise you can put them into <spanclass="path">/boot/system/non-packaged/bin/</span> or <spanclass="path">~/config/non-packaged/bin/</span>. All these locations are part of the PATH variable and are therefore automatically found.<br/>
The following isn't an exhaustive list of all Haiku-specific CLI apps, it serves just to highlight a few of the most useful to give you a taste. Feel encouraged to explore what's in the <spanclass="path">bin/</span> folders on your own a bit. Executing an app with the parameter <tt>--help</tt> shows the usage of the command and all its various options.</p>
<aid="cli-pkg"name="cli-pkg">Relating to package management: <spanclass="cli">package</span>, <spanclass="cli">pkgman</span></a></h3>
<p>The <spanclass="cli">package</span> command is used to manage HPKG packages. Have a look at the article <ahref="https://www.haiku-os.org/guides/daily-tasks/install-applications">Installing applications</a> to learn the very basics. Usually the tool <ahref="https://github.com/haikuports/haikuports/wiki">haikuporter</a> is used to create so-called recipes for automatic package building.</p>
<p><spanclass="cli">pkgman</span> is used to search, install, update and uninstall packages. Package repositories can be added, dropped and their package lists refreshed. A special kind of update is invoked with the parameter <tt>full-sync</tt>: It is more aggressive and also downgrades or removes packages, if necessary.<br/>
For more details on a parameter, append "--help", e.g. <tt>pkgman search --help</tt>.</p>
<tdvalign="top"><p>The launch_daemon starts all sorts of services and applications at boot-up. For some it was instructed to re-start them if they were quit. If you don't want that – maybe you'd like to test a modified Tracker, for example – you use <spanclass="cli">launch_roster</span> to <tt>stop</tt> the re-starting of the application before quitting it. Similarly, you can <tt>start</tt> it again or get <tt>info</tt> about it. Without parameter, <spanclass="cli">launch_roster</span> lists all apps/services that are under its control.<br/>
For example, this will stop the re-launching of the Deskbar:</p>
<tdvalign="top"><p><spanclass="cli">mountvolume</span> is preferred by many to mount local partitions and disks, because its usage is so easy: just call it with the name of the partition and you're done. Try <tt>--help</tt> for more options.</p>
<p><spanclass="cli">mount</span> can additionally mount remote disks by using a network filesystem, like NFS4. You specify the used filesystem with the <tt>-t</tt> parameter and the remote location with the <tt>-p</tt> parameter. As filesystem parameter you can use anything you find in <spanclass="path">/system/add-ons/kernel/file_system</span> (and corresponding file hierarchies under <spanclass="path">~/config</span> or "<spanclass="path">non-packaged</span>", of course). You also have to create a folder as mountpoint. Here's an example:</p>
<preclass="terminal">mkdir -p /DiskStation
mount -t nfs4 -p "192.168.178.3:volume1" /DiskStation</pre></td></tr>
<tdvalign="top"><p>A ramdisk is like a harddisk running only in the computer's memory. That makes it very fast but also volatile, because its contents vanishes when you shut down the computer, or it crashes or you experience a blackout.<br/>
To create a ramdisk of 1 GiB, format to the name "RAMses" and mount it, you enter this in Terminal or create a script of it:</p>
<preclass="terminal">ramdisk create -s 1gb
mkfs -q -t bfs /dev/disk/virtual/ram/0/raw RAMses
mountvolume RAMses</pre>
<p>Note: When creating a ramdisk, the <spanclass="cli">ramdisk</span> command prints out the path to it. If you create several disks, that path <spanclass="path">/dev/disk/virtual/ram/0/raw</span> will change!</p>
<p>To preserve the contents, at least if no calamity like a blackout etc. strikes, a ramdisk can be set up to read/write an image on the harddisk. For that, you need to supply a file of the desired size that will be read from every time you start your ramdisk, and written to when you unmount it. To create an image file "RAMimage" of 500MiB and format it, do this:</p>
<p>From now on, you start the ramdisk like this:</p>
<preclass="terminal">ramdisk create RAMimage
mountvolume RAMimage</pre>
<p>It's very important to always cleanly unmount you ramdisk, either from Tracker or with <spanclass="cli">unmount /RAMimage</span>, or the changes won't be written back to the image file!</p>