Your first session¶
torqcli is the TorqOS shell. It starts in operational mode, where you look at the machine.
configure enters configuration mode, where your changes go to a private candidate until you
commit them.
Run torqcli from your login shell to start it.
Look around¶
alice@torq> show system alarms
alice@torq> show version
alice@torq> show configuration
alice@torq> show system ledger
show system alarmschecks that the machine is exactly what its history says.show configurationis the whole machine's configuration.show system ledgerlists every recorded change, newest first. Your setup is change#1.
Type ? anywhere to see what may come next, and press Tab to complete a word.
Make a change¶
Turn on SSH and install htop:
alice@torq> configure
alice@torq# set services openssh enable true
alice@torq# set environment systemPackages htop
alice@torq# show | compare
[edit environment]
+ systemPackages [ htop ];
[edit services openssh]
+ enable true;
Nothing has changed on the machine yet: these edits are in your candidate. show | compare shows
exactly what a commit would change.
Check it, then commit it safely¶
alice@torq# commit check
alice@torq# commit confirmed 5 comment "SSH on, keys only; htop"
alice@torq# commit
commit checkbuilds the new system without switching to it.commit confirmed 5shows the comparison and the keys that will be able to log in, asks, applies the change, and rolls it back by itself in five minutes unless you confirm it.- The second
commitconfirms it.
If the change had cut you off, you would only have to wait: TorqOS puts the previous system back on its own, and records that too.
Undo it¶
Load the previous configuration into your candidate, look at what that would change, and commit:
Or undo one recorded change by its number, as show system ledger lists it (#85 here):
Leave¶
exit leaves configuration mode, and exit again leaves torqcli. Uncommitted changes stay in your
candidate for next time, and configure tells you about them.
Next: learn the shell in Using torqcli.