Skip to content

Commit 49d2660

Browse files
committed
update unix commands
1 parent 06bd254 commit 49d2660

File tree

1 file changed

+38
-20
lines changed

1 file changed

+38
-20
lines changed

docs/source/docs/troubleshooting/unix-commands.md

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,59 @@
1-
Useful Unix Commands
2-
====================
1+
# Useful Unix Commands
32

4-
SSH
5-
---
3+
## SSH
64

75
[SSH (Secure Shell)](https://www.mankier.com/1/ssh) is used to securely connect from a local to a remote system (ex. from a laptop to a coprocessor). Unlike other commands on this page, ssh is not Unix specific and can be done on Windows and MacOS from their respective terminals.
86

97
:::{note}
10-
You may see a warning similar to `The authenticity of host 'xxx' can't be established...` or `WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!`, in most cases this can be safely ignored if you have confirmed that you are connecting to the correct host over a secure connection, and the fingerprint will change when your operating system is reinstalled or PhotonVision's coprocessor image is re-flashed. You can read more about it [here](https://superuser.com/questions/421997/what-is-a-ssh-key-fingerprint-and-how-is-it-generated)
8+
You may see a warning similar to `The authenticity of host 'xxx' can't be established...` or `WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!`, in most cases this can be safely ignored if you have confirmed that you are connecting to the correct host over a secure connection, and the fingerprint will change when your operating system is reinstalled or PhotonVision's coprocessor image is re-flashed. This can also occur if you have multiple coprocessors with the same hostname on your network. You can read more about it [here](https://superuser.com/questions/421997/what-is-a-ssh-key-fingerprint-and-how-is-it-generated)
119
:::
1210

1311
Example:
1412

1513
:::{code-block}
16-
ssh username@hostname
14+
ssh pi@hostname
1715
:::
1816

19-
ip
20-
---
17+
For PhotonVision, the username will be `pi` and the password will be `raspberry`.
2118

22-
Run [ip address](https://www.mankier.com/8/ip) with your coprocessor connected to a monitor in order to see its IP address and other network configuration information.
19+
## ifconfig
2320

21+
Run [ifconfig -a](https://www.mankier.com/8/ifconfig) with your coprocessor connected to a monitor in order to see its IP address and other network configuration information.
2422

25-
SCP
26-
---
23+
Your output might look something like this:
24+
25+
:::{code-block}
26+
end1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
27+
inet 10.88.47.12 netmask 255.255.255.0 broadcast 10.88.47.255
28+
ether de:9a:8f:7d:31:aa txqueuelen 1000 (Ethernet)
29+
RX packets 72277 bytes 9038996 (9.0 MB)
30+
RX errors 0 dropped 0 overruns 0 frame 0
31+
TX packets 74932 bytes 96904767 (96.9 MB)
32+
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
33+
device interrupt 66
34+
:::
35+
36+
In this example, the numbers following `inet` (10.88.47.12) are your IP address.
37+
38+
## SCP
2739

2840
[SCP (Secure Copy)](https://www.mankier.com/1/scp) is used to securely transfer files between local and remote systems.
2941

3042
Example:
3143

3244
:::{code-block}
33-
scp [file] username@hostname:/path/to/destination
45+
scp [file] pi@hostname:/path/to/destination
3446
:::
3547

36-
SFTP
37-
---
48+
## SFTP
3849

3950
[SFTP (SSH File Transfer Protocol)](https://www.mankier.com/1/sftp#) is another option for transferring files between local and remote systems.
4051

41-
v4l2-ctl
42-
---
52+
## Filezilla
53+
54+
[Filezilla](https://filezilla-project.org/) is a GUI alternative to SCP and SFTP. It is available for Windows, MacOS, and Linux.
55+
56+
## v4l2-ctl
4357

4458
[v4l2-ctl](https://www.mankier.com/1/v4l2-ctl) is a command-line tool for controlling video devices.
4559

@@ -65,8 +79,7 @@ v4l2-ctl --list-ctrls --device path/to/video_device
6579
This command is especially useful in helping to debug when certain camera controls, like exposure, aren't behaving as expected. If you see an error in the logs similar to `WARNING 30: failed to set property [property name] (UsbCameraImpl.cpp:646)`, that means that PhotonVision is trying to use a control that doesn't exist or has a different name on your hardware. If you encounter this issue, please [file an issue](https://github.com/PhotonVision/photonvision/issues) with the necessary logs and output of the `v4l2-ctl --list-ctrls` command.
6680
:::
6781

68-
systemctl
69-
---
82+
## systemctl
7083

7184
[systemctl](https://www.mankier.com/1/systemctl) is a command that controls the `systemd` system and service manager.
7285

@@ -88,8 +101,13 @@ Restart PhotonVision:
88101
systemctl restart photonvision
89102
:::
90103

91-
journalctl
92-
---
104+
Check the status of PhotonVision:
105+
106+
:::{code-block}
107+
systemctl status photonvision
108+
:::
109+
110+
## journalctl
93111

94112
[journalctl](https://www.mankier.com/1/journalctl) is a command that queries the systemd journal, which is a logging system used by many Linux distributions.
95113

0 commit comments

Comments
 (0)