- Joined
- May 17, 2014
- Messages
- 3,611
We get a few users requesting help with command line Unix. They probably came from the MS-Windows world, though some could be Mac users. Overall, they want to know what they can do from a TrueNAS command line. (And we should probably let them know what they CAN'T do from the command line.) I am referring to direct shell, not the iXsystems' CLI.
So, anyone want to add to this effort?
Whence we have enough information, we can create a resource to point new users who have Unix command line question. I will edit this main post a bit as suggestions come in, (if any...).
----
Introduction to Unix command line for TrueNAS Core & TrueNAS SCALE
Not all Unix management will be included here. This is more related to what could be useful for a NAS device.
Please note that changing a configuration file outside of TrueNAS Core, (or SCALE), control, will likely not survive a reboot. And even if it does, it may not survive an update. Make all changes in the GUI or the TrueNAS supplied CLI. If the feature does not exist in the GUI or CLI, and is of general purpose nature, you can always submit a feature request in Jira.
The below commands do not make any changes, just display information:
TrueNAS Core, (aka FreeBSD specific items):
TrueNAS SCALE, (aka Linux specific items):
So, anyone want to add to this effort?
Whence we have enough information, we can create a resource to point new users who have Unix command line question. I will edit this main post a bit as suggestions come in, (if any...).
----
Introduction to Unix command line for TrueNAS Core & TrueNAS SCALE
Not all Unix management will be included here. This is more related to what could be useful for a NAS device.
Please note that changing a configuration file outside of TrueNAS Core, (or SCALE), control, will likely not survive a reboot. And even if it does, it may not survive an update. Make all changes in the GUI or the TrueNAS supplied CLI. If the feature does not exist in the GUI or CLI, and is of general purpose nature, you can always submit a feature request in Jira.
The below commands do not make any changes, just display information:
zpool status
zpool list
zfs list
zfs get all
df -h
uname -a
ifconfig -a
netstat -an
smartctl -x /dev/DISK
- Replace "DISK" with the disk you want SMART information from.top
- Use "q" to quitexit
- To exit a shell sessionTrueNAS Core, (aka FreeBSD specific items):
zdb -U /data/zfs/zpool.cache | grep ashift
# Get the ashift / block size used by ZFS for a poolfreebsd-version
TrueNAS SCALE, (aka Linux specific items):
zpool get ashift YOUR_POOL_NAME
# Get the ashift / block size used by ZFS for a poolhdparm -I /dev/DISK
- Replace "DISK" with the disk you want the information from
Last edited: