aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz/net>2018-11-24 16:51:02 +0100
committerneodarz <neodarz@neodarz/net>2018-11-24 16:51:02 +0100
commit59f0e9a65639c3aff85ea84aafb5ce8943445334 (patch)
tree78343c8f6b43edea55549e63fb0c4e15d156a6b1
parentcb58019bee2585e6d47bd995baeb93fa00622f8b (diff)
downloaddotfiles_ascii-59f0e9a65639c3aff85ea84aafb5ce8943445334.tar.xz
dotfiles_ascii-59f0e9a65639c3aff85ea84aafb5ce8943445334.zip
Add some cheat commands
Diffstat (limited to '')
-rw-r--r--cheat/.cheat/cryptsetup11
-rw-r--r--cheat/.cheat/ports9
-rw-r--r--cheat/.cheat/qemu14
-rw-r--r--cheat/.cheat/system_ingo1
-rw-r--r--cheat/.cheat/tty5
5 files changed, 40 insertions, 0 deletions
diff --git a/cheat/.cheat/cryptsetup b/cheat/.cheat/cryptsetup
new file mode 100644
index 0000000..a5ccc69
--- /dev/null
+++ b/cheat/.cheat/cryptsetup
@@ -0,0 +1,11 @@
+# open encrypted partition /dev/sdb1 (reachable at /dev/mapper/backup)
+cryptsetup open --type luks /dev/sdb1 backup
+
+# open encrypted partition /dev/sdb1 using a keyfile (reachable at /dev/mapper/hdd)
+cryptsetup open --type luks --key-file hdd.key /dev/sdb1 hdd
+
+# close luks container at /dev/mapper/hdd
+cryptsetup close hdd
+
+# create encrypted disk
+cryptsetup luksFormat --type luks2 /dev/sdd
diff --git a/cheat/.cheat/ports b/cheat/.cheat/ports
new file mode 100644
index 0000000..e7ac9a7
--- /dev/null
+++ b/cheat/.cheat/ports
@@ -0,0 +1,9 @@
+#Trouver un port sans utiliser internet mais le système linux installé
+#/etc/services Liste les ports par defauts utilisé
+
+# Pour avoir des infos sur les entrées de tels ou tels service
+# La configuration ce trouve: /etc/nsswitch.conf
+getent
+# Ex:
+getent services 80
+
diff --git a/cheat/.cheat/qemu b/cheat/.cheat/qemu
new file mode 100644
index 0000000..f749c29
--- /dev/null
+++ b/cheat/.cheat/qemu
@@ -0,0 +1,14 @@
+# Prepare folder for images
+
+mkdir ~/.qemu_imgs
+
+# Creating hard disk
+
+qemu-img create -f qcow2 ~/.qemu_imgs/image_file.cow 4G
+
+# Install operating system
+
+qemu-system-x86_64 -cdrom ~/Download/image.iso -boot order=d -drive file=/home/<user>/.qemu_imgs/image_file.cow,format=qcow2
+
+tips: Get the mouse after grabbed by qemu: Ctrl+Alt+g
+
diff --git a/cheat/.cheat/system_ingo b/cheat/.cheat/system_ingo
new file mode 100644
index 0000000..caa4f9b
--- /dev/null
+++ b/cheat/.cheat/system_ingo
@@ -0,0 +1 @@
+sudo inxi -Fxxxdfilmopru
diff --git a/cheat/.cheat/tty b/cheat/.cheat/tty
new file mode 100644
index 0000000..4e2e538
--- /dev/null
+++ b/cheat/.cheat/tty
@@ -0,0 +1,5 @@
+Message d'erreur : Cannot open your terminal '/dev/pts/0' - please check.
+C'est parceque un autre utilisateur (soit même) à initié le terminal
+actuel - Problament en utilisant `sudo su` pour lancer screen.
+Pour régler le problème sans se connecter avec le bon user : script /dev/null
+plus d'info : https://serverfault.com/questions/116775/sudo-as-different-user-and-running-screen/116830#116830