linux Flashcards
in Linux
don´t leave spaces
wiew hiden files
ls -la
version python # works the sam,e for windows
python3 –version
sudo –version
ping
-ping -c 4 www.google.com => count 4
-ping www.google.com => infinite
how to do the TRAZA
windows: tracert www.google.com
linux: traceroute www.google.com
delete all
rm -r *
how to delete package
sudo apt remove apache2 apache2-utils
sudo apt autoremove
why dont open the terminal
change the language
when the keyboard is not supported
configuration => teclado => change language (espanish // peru // latioamerica)
whoami
who is the user
user no esta en el archivo sudoers
su | nano /etc/sudoers
root ALL=(ALL:ALL) ALL
yeferson ALL=(ALL:ALL) ALL
apt
advanced packege tool
ufw : ubuntu firewall
sudo ufw enable
the firewall is turn on
install apache server
sudo apt update
sudo apt install apache2
sudo ufw allow ‘Apache’
cd /var/www/html
how do i know if i have a package intalled ??
which
create and open FILE
mkdir one && cd one
GREP in ALL FILES
grep orange *
dont show the word #remove the entire line
grep -v orangen fruits.txt #delete all line
GREP count
grep -n orange fruits.txt
where the passwords are stored ??
where the sudosers are stored ??
/etc/passwd
/etc/sudoers
where index.hmlt is stored ??
/var/www/html
how to replace ONLY a LETTER ?? # the file must exist
tr // translate
THE SAME
tr a A > fruits.txt // tr a-z A-Z > fruits.txt #DONT USE
cat fruits.txt | tr a A
Replace Word
sed ‘s/one/two/g’ fruits.txt
#s= sustitucion #g=global
see the amount of memory
free # you can see in KBytes
count
cat fruits.txt | nl
reset
reboot
sudo shutdown now
GENERAR SCRIPT EN UN SERVIDOR
QUE TIPO DE FORMATO ES CUANDO SE DESCARGA a filie of linux
diference between: | ||
// do
&& true // true
|| => true // not false
=> redirigir la salida de un comando
cut -c 1 #character
cut -c 1-3
history
history 5 # the last five
!! # the last command
!40 # the history number40
alias
alias one=’ls | nl’
=> one
variables
windows
linux
eleven=”mole is a small spot on a skin” # don leave spaces
=> echo $skin
twelve=’my aunt doesnt money on anything fun’
=> echo %twelve%
variable PATH
echo $PATH
very important
ls -ld directory
chmode => change mode