# QNAP Command Line

**URL:** <https://discussion.scottibyte.com/t/qnap-command-line/106>\
**Category:** Uncategorized\
**Created:** [June 29, 2022, 11:14pm UTC](https://discussion.scottibyte.com/t/qnap-command-line/106 "2022-06-29T23:14:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![scott](https://discussion.scottibyte.com/letter_avatar_proxy/v4/letter/s/3e96dc/32.png) [@scott](https://discussion.scottibyte.com/u/scott)\
**Post date:** [June 29, 2022, 11:14pm UTC](https://discussion.scottibyte.com/t/qnap-command-line/106/1 "2022-06-29T23:14:54Z")

</div>

The CLI on a QNAP NAS provides access to many capabilities that are not fully exposed on the QTS desktop. The CLI is accessed via an “ssh” session. In this video we learn how to enable and use both “ssh” and “sftp” from the Network & File Services Control Panel.

The Address for the “NEW” QNAP Club App repository is: [https://www.myqnap.org/repo.xml](https://www.myqnap.org/repo.xml)

 ![image](https://discussion.scottibyte.com/uploads/default/original/1X/902d0bc8d259d7883e2c337e10d44b7d6798be0a.png)

We installed one of the QNAP Club offered Entware apps which is an Optware package manager for embedded OS systems like the QNAP NAS.

We logged into our QNAP NAS from the command line with ssh (your address will differ):

```auto
ssh admin@172.16.1.57

```

We used the following command to update the package repository, list packages and install three packages:

```auto
opkg update
opkg list
opkg install whereis
opkg install nano
opkg install net-tools

```

To see the default file map for your QNAP:

```auto
getcfg SHARE\_DEF defVolMP -f /etc/config/def\_share.info

```

We can examine the PATH with:

```auto
echo $PATH

```

If you want to update your path you can make changes and then export the new path:

```auto
export PATH=/opt/bin:/opt/sbin:/share/CACHEDEV1_DATA/.qpkg/container-station/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/local/sbin:/usr/local/bin

```

The /share folder with your default volume map defines where your file station data is stored. In my case:

```auto
cd /share/CACHEDEV1_DATA

```

You can manage containers with “lxc”, “docker”, and docker-compose from the command line and you can do far more than container station. Watch my tutorials on LXD containers and VLANs to learn how to super charge container station by working from the CLI.
