Comandos en Debian
Comandos en Debian
Comandos en Debian
history
history 10
history -c
borrar una linea del historial, en este caso la linea 342 del historial
history -d 342
borrar pantalla
clear
COMPROBAR PARTICIONES
fdisk -l
MOSTRAR PROCESOS
ps aux
Cada proceso tiene un PID. Conociendo este PID podemos matar el proceso,
con la orden
kill -9
DIRECTORIOS
rmdir
rm -dfr nombredirectorio
rm -r
Pwd
LISTAR
ls
ls l
ls -lh
Volver al Home
cd
subir un nivel
cd ..
ARCHIVOS
Crear un archivo
touch nombrearchivo
Crear un archivo suma que tenga el contenido del archivo 1 y del archivo 2
Abrir archivo
nano nombre.archivo
ctrol + o guardar
ctrol + x salir
head -n 1 nombre.archivo
tail -n 2 nombre.archivo
Asignar contenido
cat archivo1 > archivo2
Crear archivo
cat archivo1 >> archivo2
stat nombre.archivo
Secuencia a un txt
seq 1 1000 > mil.txt
more nombre.archivo
less nombre.archivo
Mover archivo
mv nombre.archivo ../ruta
GESTIN USUARIOS
login
passwd
exit
Crear un usuario llamado pruebas
useradd pruebas
passwd pruebas
passwd -d pruebas
cat /etc/passswd
nos da la fecha
cal
whoami
Direccin de un programa
which
Instalar un programa
Reiniciar sistema
reboot
Apagar sistema
halt
COMPRESIN DE ARCHIVOS
Para extraer
tar -xvf archivo.tar
Para una sola carpeta
tar -cvf nombre.tar NombreCarpeta/
Para comprimir
tar -cvzf archivo.tar.gz archivo.tar
CONFIGURACIN DE RED
ifconfig
/sbin/ifconfig -a
nano /etc/network/interfaces
auto eth0
#Interfaz FastEthernet
address 192.168.1.49
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
ifdown eth0
ifup eth0
/etc/init.d/networking restart
nameserver 192.168.0.1
nameserver 87.216.1.65