Difference between revisions of "Linux commands"
Jump to navigation
Jump to search
Rafahsolis (talk | contribs) |
Rafahsolis (talk | contribs) |
||
| Line 80: | Line 80: | ||
|- | |- | ||
| [[Linux_command:_terminator|terminator]] || Advanced terminal | | [[Linux_command:_terminator|terminator]] || Advanced terminal | ||
| + | |- | ||
| + | | lspci -v || View PCI device information | ||
|} | |} | ||
| Line 164: | Line 166: | ||
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]] | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
Revision as of 19:04, 8 April 2015
Linux general commands
| Command | Description |
|---|---|
| tty | Shows the terminal where you are connected |
| free | Shows free memory |
| date | Shows date |
| cal | Shows calendar |
| clear | Clear screen |
| who | Connected persons |
| whoami | Who am i |
| uname | Shows system info |
| du | Disk ussage |
| df | Shows the disk ussage. Example: df -h |
| man <command> | Sowhs a command manual page |
| apropos <subject> | Sows commnads related to a subject |
| info <command> | Sows command info |
| history | Shows the commnad history (contained in ~.bash_history) |
| pwd | Shows working directory |
| touch <file_name> | Creates an empty file |
| alias | Creates a commnad |
| cat <filename> | Shows file content |
| more <filename> | Shows file content, screen by screen |
| head | Shows file start (-n, -f,...) |
| tail | Shows file end (-n, -f, ...) |
| sort | Sorts the content of a file line by line |
| <cmd1> | <cmd2> | Pipe: takes the output of command1 as input of command2. example: cat /etc/passwd | sort | more |
| rsync -a ruta1 ruta2 [--exclude=/{dir1, dir2..]/] | Copies files from ruta1 to ruta2 excluding dir1, dir2,... |
| grep <text> | finds text |
| wc -l | Counts lines |
| find | Find files |
| apt-get | Package installation and system update |
| dpkg | .deb package installation: sudo dpkg -i packagename.deb |
| su | Log as root at the terminal (sudo su) |
| mount | File sistem mounting |
| vim | Text file editor |
| mc | Midnight commander. File system navigation |
| alien | Migrate packages from .rpm to .deb and vice versa |
| scp | Copy files to a remote machine over ssh protocol |
| wget | Download files/web pages |
| fdisk | Disk partition utility |
| terminator | Advanced terminal |
| lspci -v | View PCI device information |
Users
| Command | Description |
|---|---|
| w | Show connected users |
| chown <NewOwner>:<NewGroup> <File> | Change file owner |
| chgrp <NewGroup> <File> | Change group of file |
Processes
| Command | Description |
|---|---|
| CTRL + C | Stop process |
| CTRL + Z | Pause process |
| %PID | Recover paused process |
| <command>& | Execute command in second plane |
| bg <command> | Execute command in second plane |
| ps | List processes |
| pstree | Show process tree |
| top | Processes viewer |
| htop | Process viewer more advanced than top |
| kill %PID | Terminate process |
| nice, renice | Process priorities: nice -n <command> |
| nohup <command> | Execute process avoiding its stop if the terminal is stopt |
| pgrep <pattern> | Retruns process that matches pattern |
| locate <program> | Returns program path |
vnc:escritorio remoto
Firewall
| Command | Description |
|---|---|
| iptables | Firewall rules |
| service iptables [start, stop] | Activate/deactivate firewall |
| 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
| Command | Description | ||
|---|---|---|---|
| nm-tool | Network monitor tool | ||
| nm-connection-editor | Network monitor editor | iwconfig | Show WiFi connections |
| service networkmanager restart | Restart network daemon |
Network Manager configuration files:
- /etc/NetworkManager/system-connections/name-of-connection
Network configuration file:
- /etc/network/interfaces