{{Title| title=Common {{project_name_long}} CLI Commands }} {{Header}} {{#seo: |description=Common {{project_name_short}} CLI Commands |image=Cli1242345.png }} [[image:Cli1242345.png|thumb|100px]] {{intro| There are a number of common command line operations that are performed by users of all skill levels in the {{project_name_short}} environment. This wiki page is intended to serve as a quick and handy reference guide for locating these, but it is not a substitute for reading relevant wiki entries that provide detailed instructions for various activities. This entry has been inspired by the relatively unknown {{project_name_short_lowercase}} command, which already lists common {{project_name_short}} command line operations. Additional, useful commands will be added here over time. }} __TOC__ = {{project_name_gateway_long}} = '''Table:''' ''{{project_name_gateway_short}} Common Commands'' {| class="wikitable" |- ! scope="col"| '''Category''' ! scope="col"| '''Commands''' |- ! scope="row"| Change Keyboard Layout | * To change the keyboard layout: ** {{CodeSelect|code= sudo dpkg-reconfigure keyboard-configuration }} ** {{CodeSelect|code= sudo dpkg-reconfigure console-data }} * Make the reconfigured keyboard-configuration change take effect: ** {{CodeSelect|code= sudo setupcon }} |- ! scope="row"| Circumvent uwt Wrapper Use Experts / debugging only! | * /usr/bin/apt-get.anondist-orig * /usr/bin/wget.anondist-orig * /usr/bin/curl.anondist-orig * /usr/bin/gpg.anondist-orig * /usr/bin/ssh.anondist-orig |- ! scope="row"| Connection Wizard (Enable/Disable Tor) | * {{CodeSelect|code= lxsudo anon-connection-wizard }} * {{CodeSelect|code= sudo setup-wizard-dist }} |- ! scope="row"| Default Username and Password For both {{project_name_gateway_short}} and {{project_name_workstation_long}}. | * Default username: user * Default password: changeme |- ! scope="row"| Important Configuration Files / Folders | * Important configuration files: ** {{CodeSelect|code= sudoedit /usr/local/etc/torrc.d/50_user.conf }} ** {{CodeSelect|code= sudoedit /etc/{{project_name_short_lowercase}}_firewall.d/50_user.conf }} * Important configuration folders: ** /etc/{{project_name_short_lowercase}}_firewall.d/ |- ! scope="row"| Important Logs | * {{CodeSelect|code= sudo tail -f /var/log/syslog }} * {{CodeSelect|code= sdwdate-log-viewer }} * {{CodeSelect|code= sudo tail -f /var/run/tor/log }} |- ! scope="row"| Nyx: Tor Command Line Monitor This is a Tor Controller which runs as a console application. | * Launch Nyx: {{CodeSelect|code= nyx }} |- ! scope="row"| OS Updates | * {{CodeSelect|code= upgrade-nonroot }} or * {{CodeSelect|code= sudo apt update && sudo apt full-upgrade }} |- ! scope="row"| Switch to Clearnet User The {{project_name_short_lowercase}} DNS notes state:
Check if DNS resolution is functional: * Experts only! * This is only a summary. * You normally do not need to manually resolve DNS on Whonix-Gateway. * {{project_name_short}} has by default a feature to hide the fact, that you are a {{project_name_short}} user. - This will NOT hide the fact that you are a Tor user from your ISP! -- Hiding the fact, that you are a Tor user, is available as an optional configuration. * Whonix-Workstations traffic goes through Tors Socks-, Dns- or TransPorts. - Whonix-Gateway can only send traffic through Tor as well.
-- Whonix-Gateway has no longer a Trans- or DnsPort.
-- For example, APT will actually call the uwt wrapper /usr/bin/apt-get.
-- The APT uwt wrapper will with help of uwt and torsocks force also Whonix-Gateways traffic through Tor.
-- Thus hiding the fact, that you are a {{project_name_short}} user.
* Only as either, - as clearnet user or
- after activation of transparent proxying for Whonix-Gateway
- in /etc/whonix_firewall.d/ or
- after allowing Whonix-Gateways root sending non-Tor traffic in /etc/whonix_firewall.d/
* nslookup check.torproject.org
| * {{CodeSelect|code= sudo su clearnet }} |- ! scope="row"| systemcheck | * Network Time Synchronization and Tor Connection Check: {{CodeSelect|code= systemcheck }} |- ! scope="row"| Time | * Report the date in UTC: {{CodeSelect|code= date -u }} * Manually set the system clock: {{CodeSelect|code= sudo date -s "17 FEB 2019 24:00:00" && sudo hwclock -w }} * Randomize the time: A non-zero exit codes signifies an error, while 0 means it succeeded. Also see: {{CodeSelect|code= man clock-random-manual-gui }} {{CodeSelect|code= man clock-random-manual-cli }} ** clock-random-manual-gui: a randomized clock setting (in UTC) is entered via a GUI. ** clock-random-manual-cli: a randomized clock setting (in UTC) is entered on the command line. For example: {{CodeSelect|code= echo "Wed Dec 04 06:20:13 UTC 2019" {{!}} /usr/bin/clock-random-manual-cli }} |- ! scope="row"| Tor | * Restart Network: {{CodeSelect|code= sudo service networking restart }} * Restart Tor: {{CodeSelect|code= sudo service tor restart }} * Stop Tor: {{CodeSelect|code= sudo systemctl stop tor@default }} * Check the Tor version: {{CodeSelect|code= anon-info }} * Check the Tor configuration: {{CodeSelect|code= anon-verify }} {{CodeSelect|code= sudo -u debian-tor tor --verify-config }} |- ! scope="row"| Virtual Consoles | * Text console: Press Alt + Crtl + F1 ** Additional text consoles: Press Alt + Crtl + F2 or F3 and so on. * Graphical console: Press Alt + Crtl + F7 |- ! scope="row"| VM Operations | * Reboot: {{CodeSelect|code= sudo reboot }} * Power off: {{CodeSelect|code= sudo poweroff }} |- ! scope="row"| {{project_name_short}} Version | * {{project_name_short}} version: {{CodeSelect|code= cat /etc/{{project_name_short_lowercase}}_version }} |- |} = {{project_name_workstation_short}} = '''Table:''' ''{{project_name_workstation_short}} Common Commands'' {| class="wikitable" |- ! scope="col"| '''Category''' ! scope="col"| '''Commands''' |- ! scope="row"| Change Keyboard Layout | * {{CodeSelect|code= sudo dpkg-reconfigure keyboard-configuration }} * {{CodeSelect|code= sudo dpkg-reconfigure console-data }} |- ! scope="row"| Circumvent uwt Wrapper Use | * /usr/bin/apt-get.anondist-orig * /usr/bin/wget.anondist-orig * /usr/bin/curl.anondist-orig * /usr/bin/gpg.anondist-orig * /usr/bin/git.anondist-orig * /usr/bin/ssh.anondist-orig |- ! scope="row"| Default Username and Password | * Default username: user * Default password: changeme |- ! scope="row"| DNS Resolution Functionality Test | * {{CodeSelect|code= nslookup check.torproject.org }} |- ! scope="row"| GnuPG (OpenPGP) | * Retrieve keys (example): * Display key fingerprint (example): {{CodeSelect|code= sudo apt-key adv --fingerprint A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 }} * Check file signatures (example): {{CodeSelect|code= gpg --verify tor-browser-linux64-8.5_en-US.tar.xz.asc tor-browser-linux64-8.5_en-US.tar.xz }} |- ! scope="row"| HexChat | * Reset HexChat identity: {{CodeSelect|code= hexchat-reset }} |- ! scope="row"| Important Configuration Folders and Logs | * Important configuration folders: ** /etc/{{project_name_short_lowercase}}_firewall.d/ * Important logs: ** {{CodeSelect|code= sudo tail -f /var/log/syslog }} ** {{CodeSelect|code= sdwdate-log-viewer }} |- ! scope="row"| Leak Test See: [[Dev/Leak_Tests|Leak Tests]] | * {{CodeSelect|code= leaktest }} |- ! scope="row"| Network Restart | * {{CodeSelect|code= sudo service networking restart }} |- ! scope="row"| OS Updates / Software Installation | * {{CodeSelect|code= upgrade-nonroot }} or * {{CodeSelect|code= sudo apt update && sudo apt full-upgrade }} * Install the package-name package. {{CodeSelect|code= sudo apt install package-name }} * Install the package-name package from Debian backports. Requires enabling [[Install_Software#Backports|backports]] repository. {{CodeSelect|code= sudo apt -t {{Stable_project_version_based_on_Debian_codename}}-backports install package-name }} |- ! scope="row"| systemcheck | * Network Time Synchronization and Tor Connection Check: Additionallly in {{project_name_workstation_short}}, notifications are made regarding OS updates, the {{project_name_short}} version and news. {{CodeSelect|code= systemcheck }} |- ! scope="row"| Time | * Manually set the system clock: {{CodeSelect|code= sudo date -s "17 FEB 2019 24:00:00" && sudo hwclock -w }} |- ! scope="row"| Tor Browser | Note: Tor Browser can only be started when a graphical desktop environment (DE) such as Xfce is running ({{project_name_short}} Xfce). At time of writing Tor Browser cannot be run without a running DE ({{project_name_short}} CLI without a custom installed DE). However, graphical applications such as Tor Browser can be started from command line when a DE is running. https://forums.whonix.org/t/tor-browser-on-whonix-workstation-cli/10020/8 * Important folders: ** ~/.tb/tor-browser ** ~/.tb/tor-browser/Browser/TorBrowser/Data/Browser * Tor Browser Launcher: {{CodeSelect|code= torbrowser }} * Tor Browser in debugging mode: {{CodeSelect|code= ~/.tb/tor-browser/Browser/start-tor-browser --debug }} * [[Tor_Browser#Tor_Browser_Downloader_by_Whonix|Tor Browser Downloader by {{project_name_short}} developers]]: {{CodeSelect|code= update-torbrowser }} |- ! scope="row"| Virtual Consoles | * Text console: Press Alt + Crtl + F1 ** Additional text consoles: Press Alt + Crtl + F2 or F3 and so on. * Graphical console: Press Alt + Crtl + F7 |- ! scope="row"| VM Operations | * Reboot: {{CodeSelect|code= sudo reboot }} * Power off: {{CodeSelect|code= sudo poweroff }} |- ! scope="row"| {{project_name_short}} Version | * {{project_name_short}} version: {{CodeSelect|code= cat /etc/{{project_name_short_lowercase}}_version }} |- |} = Footnotes = {{reflist|close=1}} {{Footer}} [[Category:Documentation]]