This file contains hidden or 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
provincia | iso | comunidad autónoma | |
---|---|---|---|
A CORUÑA | C | Galicia | |
ALBACETE | AB | Castilla-La Mancha | |
ALICANTE | A | Comunidad Valenciana | |
ALMERIA | AL | Andalucía | |
ARABA/ALAVA | VI | País Vasco | |
ASTURIAS | O | Asturias | |
AVILA | AV | Castilla y León | |
BADAJOZ | BA | Extremadura | |
BARCELONA | B | Cataluña |
This file contains hidden or 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
export PATH=$PATH:/home/john/myprogram # add the directory /home/john/myprogram to the path | |
which nano # shows where is the executable of "nano" located | |
whereis nano # shows where are the executable, manuals, source code, etc. of "nano" |
This file contains hidden or 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
alias clone_my_repo = "git clone http://verylongurl.com" # create an alias |
This file contains hidden or 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
echo "hello" # prints hello in the console | |
echo $USER # prints the value of the variable USER in the console | |
env # prints all the environment variables | |
set # prints all the local variables | |
MY_FRIENDS=William # create a local variable called MY_FRIENDS | |
MY_FRIENDS=$MY_FRIENDS:John:Anna # concatenate values 'John' and 'Anna' to MY_FRIENDS | |
export MY_FRIENDS # makes local variable MY_FRIENDS an environment one | |
unset MY_FRIENDS # deletes the variable MY_FRIENDS |
This file contains hidden or 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
a | b # pipe: inject a command output into b command input | |
a > file.txt # save output of command a into file.txt (overwrite) | |
a >> file.txt # save output of command a into file.txt (append) | |
echo "Hello!" | xargs echo # injects the output of the first command as an argument of the second command |
This file contains hidden or 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
su # change current user to root | |
su - # change current user and local variables to root | |
su maria # change current user to "maria" | |
sudo nano # runs command "nano" as root user |
This file contains hidden or 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
ps # shows the processes running right now on this terminal session | |
ps aux # shows all the processes running on the computer | |
htop # display an activity monitor in the terminal |
This file contains hidden or 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
uname -a # shows info about the system (kernel, architecture...) | |
sudo lshw # (only Linux) list all the hardware components | |
sudo lshw -short # (only Linux) list a summary table with the hardware components | |
lscpu # (only Linux) show information about the CPU | |
lsusb # (only Linux) list the plugged USB devices | |
date # print the current date and time |
This file contains hidden or 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
# Linux | |
echo "Hello my friend!" | xclip # copy "Hello my friend!" to the clipboard | |
xclip -o >> pasted_text.txt # paste the content of the clipboard into a text file | |
# macOS | |
echo "Hello my friend!" | pbcopy # copy "Hello my friend!" to the clipboard | |
pbpaste >> pasted_text.txt # paste the content of the clipboard into a text file |
This file contains hidden or 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
clear # cleans the console |
NewerOlder