Command line
SliTaz can be used entirely from the command line, and SliTaz Base has nothing else. Most commands come from BusyBox, a single small program that provides lightweight versions of the classic Unix tools. Open a terminal from the desktop (TazTerm) or log in on a text console with Ctrl+Alt+F2.
Conventions
In this handbook, commands starting with $ are run as a
normal user, commands starting with # need the
administrator (root). To become root, type su and the root
password, then exit when done. See
Users and root.
Getting help
Nearly every command explains itself with --help. BusyBox
lists all its commands, and Tab completes command and file
names as you type (press it twice to see the choices):
$ cp --help $ busybox --list
SliTaz tools (spk, trame, tazinst, tazlito...) print their usage when
run without arguments or with help.
Files and directories
| Command | Does |
|---|---|
pwd | Show the current directory |
ls -l | List files with details, -a to include hidden files |
cd /usr/share | Go to a directory; cd alone goes home, cd .. goes up |
mkdir -p a/b/c | Create directories, with parents |
cp file dir/ | Copy a file; cp -a copies a directory and keeps permissions |
mv old new | Move or rename |
rm file | Delete a file; rm -r dir deletes a directory and its content |
ln -s target link | Create a symbolic link |
chmod +x script.sh | Make a file executable |
chown tux:users file | Change owner (as root) |
du -sh dir | Size of a directory |
df -h | Free space on mounted file systems |
rm does not use a trash can: what is deleted is gone.
Add -i to confirm each file.
Viewing and editing files
$ cat /etc/slitaz-release $ less /var/log/messages $ head -n 20 file.txt $ tail -f /var/log/messages
less scrolls with the arrow keys, / searches and
q quits. tail -f follows a log as it grows,
Ctrl+C stops it.
To edit a text file, use nano: the shortcuts are shown at
the bottom of the screen (Ctrl+O saves,
Ctrl+X quits). vi is also available.
On the desktop, the text editor is L3afpad (l3afpad).
On SliTaz Base i486, only vi is there:
spk-add nano or tazpkg get-install nano.
# nano /etc/hostname
Searching
$ find /etc -name "*.conf" $ grep -r "DHCP" /etc/network.conf $ which spk
Archives
$ tar -czf backup.tar.gz Documents/ $ tar -xf archive.tar.xz $ unzip file.zip
tar handles gzip, bzip2, xz and lzma archives;
-t lists the content without extracting.
Processes and resources
$ top $ ps $ free $ uptime $ kill 1234 $ killall program
top shows the running programs and their CPU and memory
use, q quits. free shows the memory, which is
what SliTaz is careful with.
Downloading
$ wget https://www.slitaz.org/
Shutting down
# poweroff # reboot
On the desktop, use the logout menu. On a console, Ctrl+Alt+Del reboots.
SliTaz Doc