-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCommon_CLI_Commands.mw
More file actions
390 lines (348 loc) · 9.42 KB
/
Copy pathCommon_CLI_Commands.mw
File metadata and controls
390 lines (348 loc) · 9.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
{{Title|
title=Common {{project_name_long}} CLI Commands
}}
{{Header}}
{{#seo:
|description=Common {{project_name_short}} CLI Commands
|image=Cli1242345.png
}}
[[File: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. <ref>This entry has been inspired by the relatively unknown <code>
{{project_name_short_lowercase}}</code> command, which already lists common {{project_name_short}} command line operations.
</ref> Additional, useful commands will be added here over time.
}}
__TOC__
= {{project_name_gateway_long}} =
{| class="wikitable"
|+ ''{{project_name_gateway_short}} Common Commands''
|-
! '''Category'''
! '''Commands'''
|-
! Change Keyboard Layout
|
* To change the keyboard layout:
** {{CodeSelect|code=
sudo set-system-keymap --interactive
}}
* Make the keyboard configuration change take effect in a text console (if needed):
** {{CodeSelect|code=
sudo setupcon
}}
* Make the keyboard configuration change take effect in a GUI session (if needed):
** {{CodeSelect|code=
labwc --reconfigure
}}
|-
! Circumvent uwt Wrapper Use <ref name=experts_only>Experts / debugging only!</ref>
|
* <code>/usr/bin/apt-get.anondist-orig</code>
* <code>/usr/bin/wget.anondist-orig</code>
* <code>/usr/bin/curl.anondist-orig</code>
* <code>/usr/bin/gpg.anondist-orig</code>
* <code>/usr/bin/ssh.anondist-orig</code>
|-
! Connection Wizard (Enable/Disable Tor)
|
* {{CodeSelect|code=
anon-connection-wizard
}}
* {{CodeSelect|code=
setup-wizard-dist
}}
|-
! Default Username and Password <ref name=both_VMs>For both {{project_name_gateway_short}} and {{project_name_workstation_long}}.</ref>
|
{{Default_Passwords}}
|-
! 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:
** <code>/etc/{{project_name_short_lowercase}}_firewall.d/</code>
|-
! Important Logs
|
* {{CodeSelect|code=
sudo journalctl -f
}}
* {{CodeSelect|code=
sdwdate-log-viewer
}}
* {{CodeSelect|code=
sudo journalctl -u tor@default.service -f
}}
|-
! Nyx: Tor Command Line Monitor <ref>This is a Tor Controller which runs as a console application.</ref>
|
* Launch Nyx:
{{CodeSelect|code=
nyx
}}
|-
! OS Updates
|
* {{CodeSelect|code=
upgrade-nonroot
}} or
* {{CodeSelect|code=
sudo apt update && sudo apt full-upgrade
}}
|-
! Switch to Clearnet User <ref>The <code>{{project_name_short_lowercase}}</code> DNS notes state: <blockquote>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.<br />
-- Whonix-Gateway has no longer a Trans- or DnsPort.<br />
-- For example, APT will actually call the uwt wrapper /usr/bin/apt-get.<br />
-- The APT uwt wrapper will with help of uwt and torsocks force also Whonix-Gateways traffic through Tor.<br />
-- Thus hiding the fact, that you are a {{project_name_short}} user.<br />
* Only as either,
- as clearnet user or<br />
- after activation of transparent proxying for Whonix-Gateway<br />
- in <code>/etc/whonix_firewall.d/</code> or<br />
- after allowing Whonix-Gateways root sending non-Tor traffic in <code>/etc/whonix_firewall.d/</code><br />
* nslookup check.torproject.org</blockquote></ref>
|
* {{CodeSelect|code=
sudo su clearnet
}}
|-
! systemcheck
|
* System Health Check:
{{CodeSelect|code=
systemcheck
}}
|-
! 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: <ref>A non-zero exit codes signifies an error, while <code>0</code> means it succeeded.</ref> <ref>Also see:
{{CodeSelect|code=
man clock-random-manual-gui
}}
{{CodeSelect|code=
man clock-random-manual-cli
}}
</ref>
** <code>clock-random-manual-gui</code>: a randomized clock setting (in UTC) is entered via a GUI.
** <code>clock-random-manual-cli</code>: 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
}}
|-
! Tor
|
* Restart Tor:
{{CodeSelect|code=
sudo systemctl restart tor@default.service
}}
* Stop Tor:
{{CodeSelect|code=
sudo systemctl stop tor@default.service
}}
* Check the Tor version:
{{CodeSelect|code=
anon-info
}}
* Check the Tor configuration:
** {{CodeSelect|code=
anon-verify
}}
** Or, use <code>systemcheck</code>, mentioned above.
|-
! Virtual Consoles
|
* Text console: Press <code>Alt + Ctrl + F1</code>
** Additional text consoles: Press <code>Alt + Ctrl + F2</code> or <code>F3</code> and so on.
* Graphical console: Press <code>Alt + Ctrl + F7</code>
|-
! VM Operations
|
* Reboot:
{{CodeSelect|code=
sudo reboot
}}
* Power off:
{{CodeSelect|code=
sudo poweroff
}}
|-
! {{project_name_short}} Version
|
* {{project_name_short}} version:
{{CodeSelect|code=
cat /etc/{{project_name_short_lowercase}}_version
}}
|-
|}
= {{project_name_workstation_short}} =
{| class="wikitable"
|+ ''{{project_name_workstation_short}} Common Commands''
|-
! '''Category'''
! '''Commands'''
|-
! Change Keyboard Layout
|
* To change the keyboard layout:
** {{CodeSelect|code=
sudo set-system-keymap --interactive
}}
* Make the keyboard configuration change take effect in a text console (if needed):
** {{CodeSelect|code=
sudo setupcon
}}
* Make the keyboard configuration change take effect in a GUI session (if needed):
** {{CodeSelect|code=
labwc --reconfigure
}}
|-
! Circumvent uwt Wrapper Use <ref name=experts_only />
|
* <code>/usr/bin/apt-get.anondist-orig</code>
* <code>/usr/bin/wget.anondist-orig</code>
* <code>/usr/bin/curl.anondist-orig</code>
* <code>/usr/bin/gpg.anondist-orig</code>
* <code>/usr/bin/git.anondist-orig</code>
* <code>/usr/bin/ssh.anondist-orig</code>
|-
! Default Username and Password <ref name=both_VMs />
|
{{Default_Passwords}}
|-
! DNS Resolution Functionality Test
|
* {{CodeSelect|code=
nslookup check.torproject.org
}}
|-
! GnuPG (OpenPGP)
|
* Retrieve keys (example):
{{CodeSelect|code=
sudo gpg --recv-keys EF6E286DDA85EA2A4BA7DE684E2C6E8793298290
}}
* Check file signatures (example):
{{CodeSelect|code=
gpg --verify tor-browser-linux-x86_64-15.0.3.tar.xz.asc tor-browser-linux-x86_64-15.0.3.tar.xz
}}
|-
! Important Configuration Folders and Logs
|
* Important configuration folders:
** <code>/etc/{{project_name_short_lowercase}}_firewall.d/</code>
* Important logs:
** {{CodeSelect|code=
sudo journalctl -f
}}
** {{CodeSelect|code=
sdwdate-log-viewer
}}
|-
! Leak Test <ref>See: [[Dev/Leak_Tests|Leak Tests]]</ref>
|
* {{CodeSelect|code=
leaktest
}}
|-
! OS Updates / Software Installation
|
* {{CodeSelect|code=
upgrade-nonroot
}} or
* {{CodeSelect|code=
sudo apt update && sudo apt full-upgrade
}}
* Install the <code>package-name</code> package.
{{CodeSelect|code=
sudo apt install package-name
}}
* Install the <code>package-name</code> 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
}}
|-
! systemcheck
|
* System Health Check:
{{CodeSelect|code=
systemcheck
}}
|-
! Time
|
* Manually set the system clock:
{{CodeSelect|code=
sudo date -s "17 FEB 2025 24:00:00" && sudo hwclock -w
}}
|-
! Tor Browser
|
Note: Tor Browser can only be started when a graphical desktop environment (DE) such as LXQt is running ({{project_name_short}} LXQt). 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 the command line when a DE is running. <ref>
https://forums.whonix.org/t/tor-browser-on-whonix-workstation-cli/10020/8
</ref>
* Important folders:
** <code>~/.tb/tor-browser</code>
** <code>~/.tb/tor-browser/Browser/TorBrowser/Data/Browser</code>
* 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
}}
|-
! Virtual Consoles
|
* Text console: Press <code>Alt + Ctrl + F1</code>
** Additional text consoles: Press <code>Alt + Ctrl + F2</code> or <code>F3</code> and so on.
* Graphical console: Press <code>Alt + Ctrl + F7</code>
|-
! VM Operations
|
* Reboot:
{{CodeSelect|code=
sudo reboot
}}
* Power off:
{{CodeSelect|code=
sudo poweroff
}}
|-
! {{project_name_short}} Version
|
* {{project_name_short}} version:
{{CodeSelect|code=
cat /etc/{{project_name_short_lowercase}}_version
}}
|-
|}
= Footnotes =
<references />
{{Footer}}
[[Category:Documentation]]