Changes

Jump to navigation Jump to search
1,346 bytes added ,  17:51, 10 September 2018
Line 1: Line 1:  
== Linux general commands ==
 
== Linux general commands ==
   
{| class="wikitable sortable"
 
{| class="wikitable sortable"
 
|-
 
|-
 
! Command !! Description
 
! Command !! Description
 
|-
 
|-
| tty || Shows the terminal where you are connected
+
| [[Linux_command:_alias|alias]] || Creates a commnad
 +
|-
 +
| [[Linux_command:_alien|alien]] || Migrate packages from .rpm to .deb and vice versa
 +
|-
 +
| apropos <subject> || Sows commnads related to a subject
 
|-
 
|-
| free || Shows free memory
+
| [[Linux_comand:_apt-get|apt-get]] || Package installation and system update
 
|-
 
|-
| date || Shows date
+
| [[Linux_command:_awk|awk]] || CLI text processor
 
|-
 
|-
 
| cal || Shows calendar
 
| cal || Shows calendar
 +
|-
 +
| cat <filename> || Shows file content
 
|-
 
|-
 
| clear || Clear screen
 
| clear || Clear screen
 
|-
 
|-
| who || Connected persons
+
| [[Linux_command:_date|date]] || Shows date
 +
|-
 +
| [[Linux_command:_dd|dd]] || Create / Dump images
 
|-
 
|-
| whoami || Who am i
+
| df || Shows the disk ussage. Example: df -h -x devtmpfs -x tmpfs
 
|-
 
|-
| [[Linux_command:_uname|uname]] || Shows system info
+
| dpkg || .deb package installation: sudo dpkg -i packagename.deb
 
|-
 
|-
 
| [[Linux_command:_du|du]] || Disk ussage  
 
| [[Linux_command:_du|du]] || Disk ussage  
 
|-
 
|-
| df || Shows the disk ussage. Example: df -
+
| export VARIABLE=VALUE || To create system variables
 +
|-
 +
| [[Linux_command:_fsck|fsck]] || Check file system
 +
|-
 +
| [[Linux_command:_fdisk|fdisk]] || Disk partition utility
 +
|-
 +
| [[Linux_command:_find|find]] || Find files
 +
|-
 +
| free || Shows free memory
 +
|-
 +
| [[Linux:_gpg|gpg]] || GnuPG
 +
|-
 +
| [[Linux_comand:_grep|grep]] || finds text matching regex or text
 
|-
 
|-
| man <command> || Sowhs a command manual page 
+
| head || Shows file start (-n, -f,...)
 
|-
 
|-
| apropos <subject> || Sows commnads related to a subject
+
| history || Shows the commnad history (contained in ~.bash_history)
 
|-
 
|-
 
| info <command> || Sows command info
 
| info <command> || Sows command info
 
|-
 
|-
| history || Shows the commnad history (contained in ~.bash_history)
+
| [[Linux_command:_ln|ln]] || Create simbolic links
 +
|-
 +
| lsb_release -a || Show os name and version
 +
|-
 +
| lsblk ||  
 
|-
 
|-
| pwd || Shows working directory
+
| lspci -v || View PCI device information
 
|-
 
|-
| touch <file_name> || Creates an empty file
+
| lscpu || List cpu cores
 
|-
 
|-
| [[Linux_command:_alias|alias]] || Creates a commnad
+
| lsof || <nowiki>sudo lsof -i -n | egrep '\<ssh\>'</nowiki>
 
|-
 
|-
| cat <filename> || Shows file content
+
| man <command> || Sowhs a command manual page
 
|-
 
|-
| more <filename> || Shows file content, screen by screen
+
| mc || Midnight commander. File system navigation
 
|-
 
|-
| head || Shows file start (-n, -f,...)
+
| mkdosfs -F32 /dev/mmcblk0 || Format SD card with FAT32
 
|-
 
|-
| tail || Shows file end (-n, -f, ...)
+
| more <filename> || Shows file content, screen by screen
 
|-
 
|-
| sort || Sorts the content of a file line by line
+
| mount || File sistem mounting
 
|-
 
|-
| <nowiki><cmd1> | <cmd2></nowiki> || Pipe: takes the output of command1 as input of command2. example: <nowiki>cat /etc/passwd | sort | more</nowiki>
+
| pwd || Shows working directory
 
|-
 
|-
 
| rsync -a ruta1 ruta2 [--exclude=/{dir1, dir2..]/] || Copies files from ruta1 to ruta2 excluding dir1, dir2,...
 
| rsync -a ruta1 ruta2 [--exclude=/{dir1, dir2..]/] || Copies files from ruta1 to ruta2 excluding dir1, dir2,...
 
|-
 
|-
| grep <text> || finds text
+
| [[Linux command: rename|rename]] || Rename files allowing regex
 
|-
 
|-
| wc -l || Counts lines
+
| scp || Copy files to a remote machine over ssh protocol
 
|-
 
|-
| [[Linux_command:_find|find]] || Find files
+
| [[Linux:_SSH|ssh]] || ssh (Secure Shell)
 
|-
 
|-
| [[Linux_comand:_apt-get|apt-get]] || Package installation and system update
+
| [[Linux_command:_sed|sed]] || String replacement
 
|-
 
|-
| dpkg || .deb package installation: sudo dpkg -i packagename.deb
+
| sort || Sorts the content of a file line by line
 
|-
 
|-
 
| su || Log as root at the terminal (sudo su)
 
| su || Log as root at the terminal (sudo su)
 
|-
 
|-
| mount || File sistem mounting
+
| sudo <command>|| Execute command as root
 +
|-
 +
| [[Linux_command:_tar|tar]] || Compress/decompress tar files
 +
|-
 +
| [[Linux command: tail|tail]] || Shows file end (-n, -f, ...)
 +
|-
 +
| touch <file_name> || Creates an empty file
 
|-
 
|-
| [[Linux:_vim|vim]] || Text file editor
+
| tty || Shows the terminal where you are connected
 
|-
 
|-
| mc || Midnight commander. File system navigation
+
| [[Linux_command:_uname|uname]] || Shows system info
 
|-
 
|-
| [[Linux_command:_alien|alien]] || Migrate packages from .rpm to .deb and vice versa
+
| [[Linux_comand:_visudo|visudo]] || visudo is used to securely edit /etc/sudoers
 
|-
 
|-
| scp || Copy files to a remote machine over ssh protocol
+
| wc -l || Counts lines
 
|-
 
|-
 
| [[Linux_command:_wget|wget]] || Download files/web pages
 
| [[Linux_command:_wget|wget]] || Download files/web pages
 
|-
 
|-
| [[Linux_command:_fdisk|fdisk]] || Disk partition utility
+
| [[Linux:_vim|vim]] || Text file editor
 +
|-
 +
| who || Connected persons
 +
|-
 +
| whoami || Who am i
 +
|-
 +
| [[Linux_command:_xargs|xargs]] || Send output of command to stdin
 
|-
 
|-
| [[Linux_command:_terminator|terminator]] || Advanced terminal
+
| <nowiki><cmd1> | <cmd2></nowiki> || Pipe: takes the output of command1 as input of command2. example: <nowiki>cat /etc/passwd | sort | more</nowiki>
 
|}
 
|}
   −
 
+
== Users and File permissions ==
== Users ==
   
{| class="wikitable sortable"
 
{| class="wikitable sortable"
 
|-
 
|-
 
! Command !! Description
 
! Command !! Description
 
|-
 
|-
 +
| [[Linux_command:_adduser|adduser]] || Add users
 
| w || Show connected users
 
| w || Show connected users
 
|-
 
|-
Line 93: Line 128:  
|-
 
|-
 
| chgrp <NewGroup> <File> || Change group of file  
 
| chgrp <NewGroup> <File> || Change group of file  
 +
|-
 +
| [[Linux_command:_chmod|chmod]] || Change file permissions
 
|}
 
|}
   Line 130: Line 167:  
|-
 
|-
 
|}
 
|}
  −
vnc:escritorio remoto
      
== Firewall ==
 
== Firewall ==
Line 144: Line 179:  
| route -n || Shows routing table
 
| route -n || Shows routing table
 
|}
 
|}
  −
JOHN
  −
                se crea el directorio /root/.john
  −
        john --wordlist:[archivodiccionario] [archivo paswords]
  −
        john --show[=LEFT]            show cracked passwords [if =LEFT, then uncracked]
      
== Networking ==
 
== Networking ==
Line 154: Line 184:  
|-
 
|-
 
! Command !! Description
 
! Command !! Description
 +
|-
 +
| [[Linux command: netstat|netstat]] ||
 +
|-
 +
| nmap || Network mapping
 
|-
 
|-
 
| nm-tool || Network monitor tool
 
| nm-tool || Network monitor tool
 
|-
 
|-
 
| nm-connection-editor || Network monitor editor
 
| nm-connection-editor || Network monitor editor
 +
|-
 +
| ifconfig || Show network configuration
 +
|-
 
| iwconfig || Show WiFi connections
 
| iwconfig || Show WiFi connections
 
|-
 
|-
Line 164: Line 201:  
Network Manager configuration files:<br />
 
Network Manager configuration files:<br />
 
*/etc/NetworkManager/system-connections/name-of-connection
 
*/etc/NetworkManager/system-connections/name-of-connection
 +
Network configuration file:
 +
*/etc/network/interfaces
    +
== Linux key files/directories ==
 +
See: [[Linux:_Key_files/folders|Linux key files/directories]]
   −
HARDWARE
  −
lspci -v: Muestra información dispositivos PCI
     −
ARCHIVOS IMPORTANTES
+
== Programs ==
        /etc/sudoers
+
{| class="wikitable sortable"
        carpetas de archivos ejecutables (para cada usuario en archivo home .bashrc, abrir con vim.bashrc)
+
|-
                        (Ver /usr/share/doc/examples/startup-files del paquete bash-doc)
+
! Command !! Description
                /opt/sge/bin
+
|-
                /usr/local/bin
+
| [[Linux_command:_git|git]] || Software repository
        /etc/init.d/ "directorio para los escripts de los daemons aplicaciones arrancan al inicio.
+
|-
 
+
| coursera-dl ||
RED
+
|-
/etc/network/interfaces Configuración de red
+
| [[Jp2a|jp2a]] || Jpg to ASCII
/etc/NetworkManager/system-connections/name-of-connection
+
|-
 +
| [[Linux:_John|john]] || John the ripper
 +
|-
 +
| [[Linux:_macchanger|macchanger]] || Change MAC address
 +
|-
 +
| openvpn || Connect to VPN
 +
|-
 +
| [[Linux_command:_terminator|terminator]] || Advanced terminal
 +
|-
 +
| [[Virtualenv|virtualenv]] || Create virtual enviroments
 +
|-
 +
| [[Virtualenvwrapper|virtualenvwrapper]] || Simplify virtualenv ussage
 +
|-
 +
| [[Linux:_youtube-dl|youtube-dl]] || YouTube video downloader
 +
|}
 +
vnc:escritorio remoto
 +
== Save command without running to recover later ==
 +
ctrl+u --> saves
 +
ctrl+y --> recover

Navigation menu