cheats/linux.md

29 lines
649 B
Markdown
Raw Normal View History

2020-02-13 20:20:26 +01:00
# Linux Cheats
## Arduino
Find what 'channel'(?) the Arduino is plugged in at:
`dmesg | grep tty`
Do following commands to "talk" with an Arduino (with a set script):
> python
> import serial
> ser = serial.Serial('/dev/ttyACM0',115200)
> ser.readline()
> ser.write("PP\n")
---
## SSH
Copy files to/from an SSH connection: (SSH format: `user@host:/path` )
> `scp <source> <destination>`
Recursivly give directories execute privileges: (`-type f` for files instead)
> `find /path/to/base/dir -type d -exec chmod +c {} +`
---
## GROUPS
Create groups
> `groupadd <groupName>`
Add user to a group
> `usermod -a -G <group> <user>`