mirror of
https://github.com/MichaelCade/90DaysOfDevOps.git
synced 2025-03-09 20:30:34 +07:00
Translated to Spanish the day20 file
Signed-off-by: Manuel Vergara <manuel@vergaracarmona.es>
This commit is contained in:
parent
38d767fec4
commit
bcd6ba3e0b
BIN
2022/es/Days/Images/Day20_Linux9.png
Normal file
BIN
2022/es/Days/Images/Day20_Linux9.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 497 KiB |
@ -1,146 +1,199 @@
|
||||
## Dev workstation setup - All the pretty things
|
||||
## Configuración de la estación de trabajo de desarrollo - Todas las cosas bonitas
|
||||
|
||||
Not to be confused with us setting Linux servers up this way but I wanted to also show off the choice and flexibility that we have within the Linux desktop.
|
||||
No debemos confundirnos la configuración de servidores Linux con la de escritorio, pero es relevante mostrar la elección y la flexibilidad que podemos tener en el escritorio Linux.
|
||||
|
||||
I have been using a Linux Desktop for almost a year now and I have it configured just the way I want from a look and feel perspective. Using our Ubuntu VM on Virtual Box we can run through some of the customisations I have made to my daily driver.
|
||||
El autor, estuvo usando un escritorio Linux durante casi un año y su configuración muestra una perspectiva de apariencia especializada para el trabajo SysAdmin. Podemos probar en la máquina virtual de Ubuntu en Virtual Box, para poder ver algunas de estas personalizaciones. El traductor lleva más de 10 años en entornos Linux así que algún aporte encontraréis en la versión en castellano.
|
||||
|
||||
I have put together a YouTube video walking through the rest as some people might be able to better follow along:
|
||||
Vídeo en YouTube para quien quiera seguirlo por esta vía (Clicar en imagen):
|
||||
|
||||
[](https://youtu.be/jeEslAtHfKc)
|
||||
|
||||
Out of the box, our system will look something like the below:
|
||||
Recordemos, nuestro Ubuntu 20.04 en Virtual box se verá algo así:
|
||||
|
||||

|
||||
|
||||
We can also see our default bash shell below,
|
||||
También podemos ver el shell bash por defecto a continuación:
|
||||
|
||||

|
||||
|
||||
A lot of this comes down to dotfiles something we will cover in this final Linux session of the series.
|
||||
Mucho de esto se reduce a dotfiles algo que cubriremos en esta última sesión de Linux de nuestro viaje 90DaysOfDevOps.
|
||||
|
||||
### dotfiles
|
||||
|
||||
First up I want to dig into dotfiles, I have said on a previous day that Linux is made up of configuration files. These dotfiles are configuration files for your Linux system and applications.
|
||||
Primero vamos a profundizar en los dotfiles. Linux está hecho de archivos de configuración de sistema y de aplicaciones, los llamados dotfiles.
|
||||
|
||||
I will also add that dotfiles are not just used to customise and make your desktop look pretty, there are also dotfile changes and configurations that will help you with productivity.
|
||||
Los dotfiles no sólo se usan para personalizar y hacer que se vea más bonito tu escritorio, también hay cambios y configuraciones de dotfiles que te ayudarán con la productividad añadiendo funcionalidades o quitando, si prefieres el minimalismo.
|
||||
|
||||
As I mentioned many software programs store their configurations in these dotfiles. These dotfiles assist in managing functionality.
|
||||
La mayoría del software que encontrarás para Linux almacenana sus configuraciones en estos dotfiles. Cada dotfile comienza con un punto `.` para que permanezcan ocultos y no incurrir en error.
|
||||
|
||||
Each dotfile starts with a `.` You can probably guess where the naming came from?
|
||||
|
||||
So far we have been using bash as our shell which means you will have a .bashrc and .bash_profile in our home folder. You can see below a few dotfiles we have on our system.
|
||||
Hasta ahora hemos estado utilizando bash como nuestro shell. Pues bien, bash tiene varios archivos de configuración en nuestra carpeta `$HOME`: .bashrc y .bash_profile . A continuación puedes ver algunos dotfiles que tenemos en nuestro sistema recién instalado.
|
||||
|
||||

|
||||
|
||||
We are going to be changing our shell, so we will later be seeing a new `.zshrc` configuration dotfile.
|
||||
Vamos a cambiar nuestro shell por zsh, así que más adelante veremos un nuevo dotfile de configuración `.zshrc`.
|
||||
|
||||
But now you know if we refer to dotfiles you know they are configuration files. We can use them to add aliases to our command prompt as well as paths to different locations. Some people publish their dotfiles so they are publicly available. You will find mine here on my GitHub [MichaelCade/dotfiles](https://github.com/MichaelCade/dotfiles) here you will find my custom `.zshrc` file, my terminal of choice is terminator which also has some configuration files in the folder and then also some background options.
|
||||
Ahora ya sabes que si nos referimos a dotfiles estamos hablando de los archivos de configuración. Por ejemplo, los de shell, podemos utilizarlos para añadir alias a nuestro símbolo del sistema, así como rutas a diferentes ubicaciones. Algunas personas publican sus dotfiles para que estén disponibles públicamente. Encontrarás el del autor, Michael Cade, en [MichaelCade/dotfiles](https://github.com/MichaelCade/dotfiles) con el archivo personalizado `.zshrc`. La terminal escogida, Terminator, también tiene algunos archivos de configuración en la carpeta y también algunas opciones de fondo.
|
||||
|
||||
Por otra parte, el traductor también tiene publicada la configuración de la shell en [gitea.vergaracarmona.es/man-linux/zsh-shell](https://gitea.vergaracarmona.es/man-linux/zsh-shell). Aquí encontrarás otra forma de personalizar, cada uno debe buscar su comodidad. En este caso también se usa zsh con Oh my zsh y la terminal [Tilix](https://github.com/gnunn1/tilix).
|
||||
|
||||
### ZSH
|
||||
|
||||
As I mentioned throughout our interactions so far we have been using a bash shell the default shell with Ubuntu. ZSH is very similar but it does have some benefits over bash.
|
||||
Como hemos mencionado, hasta ahora hemos estado usando un shell bash que es el que viene por defecto con Ubuntu. ZSH es muy similar pero tiene algunos beneficios sobre bash.
|
||||
|
||||
Zsh has features like interactive Tab completion, automated file searching, regex integration, advanced shorthand for defining command scope, and a rich theme engine.
|
||||
Zsh tiene características como:
|
||||
- El completado interactivo de Tabuladores.
|
||||
- Búsqueda automatizada de archivos.
|
||||
- Integración regex.
|
||||
- Taquigrafía avanzada para definir el alcance de los comandos.
|
||||
- Un extenso motor de temas.
|
||||
- etc.
|
||||
|
||||
We can use our `apt` package manager to get zsh installed on our system. Let's go ahead and run `sudo apt install zsh` from our bash terminal. I am going to do this from within the VM console vs being connected over SSH.
|
||||
Podemos instalar zsh con nuestro gestor de paquetes `apt`. Vamos a ejecutar:
|
||||
```shell
|
||||
sudo apt install zsh
|
||||
```
|
||||
En la imagen veréis que se utiliza la consola de la máquina virtual en lugar de estar conectado a través de SSH. Lo podéis hacer como queráis, no necesitáis interfaz gráfica.
|
||||
|
||||
When the installation command is complete you can run `zsh` inside your terminal, this will then start a shell configuration script.
|
||||
Cuando el comando de instalación se haya completado puedes ejecutar `zsh`. La primera vez que se haga iniciará un script de configuración del nuevo shell.
|
||||
|
||||

|
||||
|
||||
I selected `1` to the above question and now we have some more options.
|
||||
De base, sin ningún tipo de extensión o plugin, ya es muy configurable. Seleccionamos `1` a la pregunta anterior para ver algunas opciones más.
|
||||
|
||||

|
||||
|
||||
You can see from this menu that we can make some out of the box edits to make ZSH configured to our needs.
|
||||
Podrás ver que podemos hacer algunos cambios para configurar ZSH a nuestro gusto o necesidades.
|
||||
|
||||
If you exit the wizard with a `0` and then use the `ls -al | grep .zshrc` you should see we have a new configuration file.
|
||||
Si sales del asistente con un `0` y luego usas
|
||||
|
||||
Now we want to make zsh our default shell every time we open our terminal, we can do this by running the following command to change our shell `chsh -s $(which zsh)` we then need to log out and back in again for the changes to take place.
|
||||
```shell
|
||||
ls -al | grep .zshrc
|
||||
```
|
||||
|
||||
When you log back and open a terminal it should look something like this. We can also confirm our shell has now been changed over by running `which $SHELL`
|
||||
deberías ver que tenemos un nuevo archivo de configuración.
|
||||
|
||||
Ya que tenemos un shell más potente y personalizable que bash, vamos a hacer que zsh sea el shell por defecto cada vez que abramos un terminal. Podemos hacer esto ejecutando el siguiente comando
|
||||
|
||||
```shell
|
||||
chsh -s $(which zsh)
|
||||
```
|
||||
|
||||
Entonces tendremos que cerrar la sesión y volver a entrar de nuevo para que se realicen los cambios. También podemos ejecutar en la/s terminal/es abierta/s el comando
|
||||
|
||||
```shell
|
||||
exec zsh
|
||||
```
|
||||
|
||||
También podemos confirmar que nuestro shell ha cambiado ejecutando `which $SHELL`.
|
||||
|
||||

|
||||
|
||||
I generally perform this step on each Ubuntu desktop I spin up and find in general without going any further that the zsh shell is a little faster than bash.
|
||||
El autor, Michael Cade, generalmente realiza este paso en cada escritorio Ubuntu que arranca ya que considera que el shell zsh es un poco más rápido que bash.
|
||||
|
||||
El traductor lo instala tan solo en los equipos con los que trabaja habitualmente. Bash va incorporado dentro de zsh, al igual que sh, y considera que como velocidad el más liviano siempre ganará la partida. Entre estos tres es sh. Pero zsh tiene grandes posibilidades de personalización, con lo cuál puede ser mucho más productivo para trabajar con él. Esto es importante tenerlo en cuenta a la hora de crear scripts, sh siempre será estará instalado y será el más rápido, pero seguramente las distros con tan solo sh no tendrán muchos de los scripts y programas básicos, como los que puedes encontrar en Ubuntu.
|
||||
|
||||
### OhMyZSH
|
||||
|
||||
Next up we want to make things look a little better and also add some functionality to help us move around within the terminal.
|
||||
Para hacer que las cosas se vean un poco mejor y también añadir un poco de funcionalidades utilizaremos el framework gratuito y de código abierto
|
||||
OhMyZSH.
|
||||
|
||||
OhMyZSH is a free and open source framework for managing your zsh configuration. There are lots of plugins, themes and other things that just make interacting with the zsh shell a lot nicer.
|
||||
Con este framework, podremos gestionar la configuración y personalización de zsh hasta niveles estratosféricos. Tiene un montón de plugins, temas y muchos otros recursos que hacen que interactuar con el shell zsh sea mucho más agradable y productivo. Todo esto gracias a una gran comunidad que mantiene y alimenta el proyecto.
|
||||
|
||||
You can find out more about [ohmyzsh](https://ohmyz.sh/)
|
||||
Es muy recomendable que dediques un tiempo a examinar todo su potencial, tanto en su [web](https://ohmyz.sh/) como en su [repositorio](https://github.com/ohmyzsh/ohmyzsh/).
|
||||
|
||||
Let's get Oh My ZSH installed, we have a few options with `curl` `wget` or `fetch` we have the first two available on our system but I will lead with `curl`
|
||||
Vamos a instalar Oh My ZSH. Si vamos a su documentación veremos que tenemos distintas opciones: `curl` `wget` o `fetch`. Las dos primeras están disponibles por defecto en Ubuntu. Para hacerlo con `curl` sería así:
|
||||
|
||||
`sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"`
|
||||
```shell
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
||||
```
|
||||
|
||||
When you have run the above command you should see some output like the below.
|
||||
Cuando hayas ejecutado el comando anterior deberías ver una salida como la mostrada en la siguiente captura de pantalla.
|
||||
|
||||

|
||||
|
||||
Now we can move on to start putting a theme in for our experience, there are well over 100 bundled with Oh My ZSH but my go-to for all of my applications and everything is the Dracula theme.
|
||||
Ahora podemos empezar a poner un tema, hay más de 100 incluidos con Oh My ZSH. El favorito de Michael Cade es el tema de Drácula.
|
||||
|
||||
I also want to add that these two plugins are a must when using Oh My ZSH.
|
||||
Dos plugins imprescindibles para Oh My ZSH se instala así:
|
||||
|
||||
`git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions`
|
||||
```shell
|
||||
git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
|
||||
```
|
||||
|
||||
`git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting`
|
||||
```shell
|
||||
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
|
||||
```
|
||||
Luego tendremos que editar el dotfile con nuestro editor favorito (Como vimos en días anteriores, puede ser nano o vim) `~/.zshrc`
|
||||
|
||||
`nano ~/.zshrc`
|
||||
Para incluir los plugins debes añadirlos en:
|
||||
|
||||
edit the plugins to now include `plugins=(git zsh-autosuggestions zsh-syntax-highlighting)`
|
||||
```sh
|
||||
plugins=(
|
||||
git
|
||||
zsh-autosuggestions
|
||||
zsh-syntax-highlighting
|
||||
)
|
||||
```
|
||||
|
||||
## Gnome Extensions
|
||||
Así ya tendrás los primeros plugins añadidos. Puedes ver el dotfile completo del traductor [aquí](https://gitea.vergaracarmona.es/man-linux/zsh-shell/src/branch/master/files/zshrc).
|
||||
|
||||
I also use Gnome extensions, and in particular the list below
|
||||
## Extensiones Gnome
|
||||
|
||||
[Gnome extensions](https://extensions.gnome.org)
|
||||
También puedes usar las extensiones de Gnome. En particular, Michael Cade, te recomienda la siguiente lista:
|
||||
|
||||
- Caffeine
|
||||
- CPU Power Manager
|
||||
- Dash to Dock
|
||||
- Desktop Icons
|
||||
- User Themes
|
||||
[Extensiones Gnome](https://extensions.gnome.org)
|
||||
|
||||
## Software Installation
|
||||
- Caffeine
|
||||
- CPU Power Manager
|
||||
- Dash to Dock
|
||||
- Desktop Icons
|
||||
- User Themes
|
||||
|
||||
A short list of the programs I install on the machine using `apt`
|
||||
## Instalación de Software
|
||||
|
||||
- VSCode
|
||||
- azure-cli
|
||||
- containerd.io
|
||||
- docker
|
||||
- docker-ce
|
||||
- google-cloud-sdk
|
||||
- insomnia
|
||||
- packer
|
||||
- terminator
|
||||
- terraform
|
||||
- vagrant
|
||||
Una breve lista de los programas que instala el autor usando `apt`.
|
||||
|
||||
- VSCode
|
||||
- azure-cli
|
||||
- containerd.io
|
||||
- docker
|
||||
- docker-ce
|
||||
- google-cloud-sdk
|
||||
- insomnia
|
||||
- packer
|
||||
- terminator
|
||||
- terraform
|
||||
- vagrant
|
||||
|
||||
### Dracula theme
|
||||
|
||||
This site is the only theme I am using at the moment. Looks clear, and clean and everything looks great. [Dracula Theme](https://draculatheme.com/) It also has you covered when you have lots of other programs you use on your machine.
|
||||
Este es el tema que usa el autor Michael Cade. Se ve claro, y limpio y todo se ve muy bien. [Dracula Theme](https://draculatheme.com/) también cubre cuando tienes muchos otros programas en tu máquina.
|
||||
|
||||
From the link above we can search for zsh on the site and you will find at least two options.
|
||||
Desde el enlace anterior podemos buscar zsh en el sitio y encontrarás al menos dos opciones.
|
||||
|
||||
Follow the instructions listed to install either manually or using git. Then you will need to finally edit your `.zshrc` configuration file as per below.
|
||||
Sigue las instrucciones listadas para instalar ya sea manualmente o usando git. Luego necesitarás finalmente editar tu archivo de configuración `.zshrc` como se indica a continuación.
|
||||
|
||||

|
||||
|
||||
You are next going to want the [Gnome Terminal Dracula theme](https://draculatheme.com/gnome-terminal) with all instructions available here as well.
|
||||
|
||||
It would take a long time for me to document every step so I created a video walkthrough of the process. (**Click on the image below**)
|
||||
También puedes escoger el [Gnome Terminal Dracula theme](https://draculatheme.com/gnome-terminal). Llevaría mucho tiempo documentar cada paso, pero puedes ver un vídeo con el proceso. (Haga clic en la imagen)
|
||||
|
||||
[](https://youtu.be/jeEslAtHfKc)
|
||||
|
||||
If you made it this far, then we have now finished our Linux section of the #90DaysOfDevOps. Once again I am open to feedback and additions to resources here.
|
||||
Como mencioné anteriormente, también puedes ver otra personalización del traductor en el [repositorio zsh-shell](https://gitea.vergaracarmona.es/man-linux/zsh-shell).
|
||||
|
||||
I also thought on this it was easier to show you a lot of the steps through video vs writing them down here, what do you think about this? I do have a goal to work back through these days and where possible create video walkthroughs to add in and better maybe explain and show some of the things we have covered. What do you think?
|
||||
Puedes ver el resultado en la siguiente captura.
|
||||
|
||||
## Resources
|
||||

|
||||
|
||||
## Extra del traductor
|
||||
|
||||
En diciembre de 2022 se realizó la instalación de Ubuntu 22.04.01 en un equipo de trabajo. Se documento un índice de los pasos seguidos y, en el futuro, se irá completando con guías de cada una de las instalaciones. Puede que incluso con un script que instale todos los programas extras con una sola ejecución: [Repositorio "Preparación de un equipo"](https://gitea.vergaracarmona.es/manuelver/preparacion-equipo).
|
||||
|
||||
---
|
||||
|
||||
Si has llegado hasta aquí te tengo que dar la enhorabuena, hemos terminado los días de Linux de los #90DaysOfDevOps. No olvides investigar por tu cuenta y prácticas mucho muchísimo. Los conocimientos adquiridos de manera autodidacta suelen ser los que nunca se olvidan.
|
||||
|
||||
|
||||
## Recursos
|
||||
|
||||
- [Bash in 100 seconds](https://www.youtube.com/watch?v=I4EWvMFj37g)
|
||||
- [Bash script with practical examples - Full Course](https://www.youtube.com/watch?v=TPRSJbtfK4M)
|
||||
@ -148,9 +201,13 @@ I also thought on this it was easier to show you a lot of the steps through vide
|
||||
- [The Beginner's guide to SSH](https://www.youtube.com/watch?v=2QXkrLVsRmk)
|
||||
- [Vim in 100 Seconds](https://www.youtube.com/watch?v=-txKSRn0qeA)
|
||||
- [Vim tutorial](https://www.youtube.com/watch?v=IiwGbcd8S7I)
|
||||
- [Guía básica de Vim](https://gitea.vergaracarmona.es/man-linux/Guia-VIM)
|
||||
- [Learn the Linux Fundamentals - Part 1](https://www.youtube.com/watch?v=kPylihJRG70)
|
||||
- [Linux for hackers (don't worry you don't need to be a hacker!)](https://www.youtube.com/watch?v=VbEx7B_PTOE)
|
||||
- [Webminal](https://www.webminal.org/)
|
||||
- [Preparación de un equipo Ubuntu 22.04](https://gitea.vergaracarmona.es/manuelver/preparacion-equipo)
|
||||
- [Configuración personal de la shell con zsh](https://gitea.vergaracarmona.es/man-linux/zsh-shell)
|
||||
|
||||
Tomorrow we start our 7 days of diving into Networking, we will be looking to give ourselves the foundational knowledge and understanding of Networking around DevOps.
|
||||
Mañana empezamos nuestros 7 días de inmersión en Redes, vamos a tratar de ver los conocimientos básicos y la comprensión de Redes en torno a DevOps. Abróchate el cinturón y...
|
||||
|
||||
See you on [Day21](day21.md)
|
||||
Nos vemos en el [Día 21](day21.md) 🦾
|
||||
|
Loading…
Reference in New Issue
Block a user