$ docker
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
apt-cache policy docker-ce
sudo apt-get install -y docker-ce
sudo usermod -aG docker ubuntu
sudo systemctl status docker
#Press CTRL+C or CTRL+Z to exit from the above command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
############################################################################## | |
# SHORTCUTS and HISTORY | |
############################################################################## | |
CTRL+A # move to beginning of line | |
CTRL+B # moves backward one character | |
CTRL+C # halts the current command | |
CTRL+D # deletes one character backward or logs out of current session, similar to exit | |
CTRL+E # moves to end of line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#variables | |
DISTRO=$(lsb_release -ds) | |
USERID=$(id -u) | |
DOMAIN="web.192.168.56.108.nip.io" | |
WEB="pages" | |
#Check user |
Linux - gestión de permisos
- En un directorio vacío (nuevo), crear 9 archivos (archiv1, archiv2, etc.) utilizando el comando
touch
:
Deberás quitarle todos los permisos con el comando
chmod a-rwx archiv*
Ejercicios comandos Linux
- Listar todos los archivos del directorio bin.
ls /bin - Listar todos los archivos del directorio tmp.
ls /tmp - Listar todos los archivos del directorio etc que empiecen por t en orden inverso.
ls –r /etc/t* - Listar todos los archivos del directorio dev que empiecen por tty y tengan 5 caracteres.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SRC_REPO=https://github.com/roxsross/frontend-angular-docker | |
SRC_DIR=frontend-angular-docker | |
# Clone website | |
rm -Rf temp/ | |
mkdir temp | |
cd temp | |
git clone ${SRC_REPO} | |
cd ${SRC_DIR} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | |
<title>Hello World - Bootcamp DevOps</title> | |
<style> | |
h1 { | |
font-weight: lighter; |