Compare commits

...

6 Commits

Author SHA1 Message Date
Ashwin Bose
217ff723ea Merge 12f7e23f8f into 10872e02d1 2024-06-12 22:55:35 +00:00
Julien Le Coupanec
10872e02d1 Merge pull request #385 from WPRobson/master
add docker init command to docker cheatsheet
2024-06-07 23:35:19 +02:00
Julien Le Coupanec
365b4f72b7 Merge pull request #390 from MagedMohamedTurk/patch-1
Update C.txt
2024-06-07 23:34:57 +02:00
Maged Turkoman
0f74ebe37b Update C.txt 2024-06-01 09:07:47 +03:00
Will Robson
bf4c0379f2 add docker init command to docker cheatsheet 2024-05-12 20:01:26 +01:00
Ashwin Bose
12f7e23f8f Exit from unresponsive shell
See [this](https://superuser.com/questions/467398/how-do-i-exit-an-ssh-connection#:~:text=in%20the%20case%20where%20you,you%20to%20your%20command%20prompt.) for more info
2021-03-11 10:01:47 +01:00
3 changed files with 4 additions and 1 deletions

View File

@@ -149,6 +149,7 @@ Operators
^= bitwise exclusive or and store
|= bitwise or and store
, separator as in ( y=x,z=++x )
; statement terminator.
Operator precedence

View File

@@ -153,6 +153,8 @@ ssh user@host # connects to host as user
ssh -p <port> user@host # connects to host on specified port as user
ssh-copy-id user@host # adds your ssh key to host for user to enable a keyed or passwordless login
<Enter> + ~ + . # Exit an unresponsive SSH shell connection
whoami # returns your username
su <user> # switch to a different user
su - # switch to root, likely needs to be sudo su -

View File

@@ -2,7 +2,7 @@
# DOCKER
##############################################################################
docker init # Creates Docker-related starter files
docker build -t friendlyname . # Create image using this directory's Dockerfile
docker run -p 4000:80 friendlyname # Run "friendlyname" mapping port 4000 to 80
docker run -d -p 4000:80 friendlyname # Same thing, but in detached mode