# OS Tips related to exploitation systems ## Install iso ### Ubuntu or debian Use `startup disk creator` under ubuntu. ### Command line Check what is you USB drive with `lsblk` Unmount with `sudo umount /dev/sdb1` Install iso with ```sh sudo dd bs=4M if=dsl-4.4.10.iso of=/dev/sdb status=progress oflag=sync ``` ## Ubuntu server ### Fix disabled ethernet Get interface name (e.g.: _enp2s0_): `ip addr` Edit the file `/etc/netplan/00-installer-config.yaml` and fix your interface name. ## Ubuntu desktop Tips to set Ubuntu desktop. ### Wipe a disk without sleep ```sh sudo systemd-inhibit shred -n 2 -zf /dev/sdX ``` `systemd-inhibit` prevent computer to sleep during commande. ### Change default terminal to Xfce terminal Install xfce terminal with **Ubuntu software**. Use the command : `sudo update-alternatives --config x-terminal-emulator` ### Game save folder for Gog games FTL and Into the Breach saves are in `.local/share/` folder. ### Add desktp apps Set your _desktop_ file in `~/.local/share/applications/`. [Tutorial to create a desktop file](https://linuxconfig.org/how-to-create-custom-desktop-files-for-launchers-on-linux). [Complete list of keys on freedesktop.org](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#recognized-keys). ## Grub `sudo update-grub` ## Install dynamic library Tested with [box2d](https://github.com/erincatto/box2d). ### Install includes Header files (`*.h`) must rely in a include folder, like `/usr/local/include/`. You can group headers in folders, but you have to take folders into account for preprocessing : On your file system : ``` include |—— hello.h \—— box2d |── b2_world.h \—— box2d.h ``` In C++ : ``` #include #include ``` ### Library Compiled files (`*.a` or `*.so`, commonly generated through a buil system like `make` or `cmake`), must rely in a linked folder, like `/usr/local/lib`. ### Linking If your static lib is named `libhello.a`, you link with the compiler flag `-lhello`. For instance, `libbox2d.a` is linked with the flag `-lbox2d`. ## Windows and Linux ### Time clash #### Use same time as windows timedatectl set-local-rtc 1 --adjust-system-clock #### Revert timedatectl set-local-rtc 0 --adjust-system-clock