Linux/1-Commands: Difference between revisions
< Linux
No edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
! Other | ! Other | ||
|- | |- | ||
|colspan=" | |colspan="5" style="background-color:#ffffff;" | <br> '''Basic''' | ||
|- | |- | ||
| dir | | dir | ||
Line 21: | Line 21: | ||
| | | | ||
|- | |- | ||
|colspan=" | |colspan="5" style="background-color:#ffffff;"| <br> '''Files''' | ||
|- | |- | ||
| mkdir | | mkdir | ||
Line 65: | Line 65: | ||
| | | | ||
|- | |- | ||
|colspan=" | |colspan="5" style="background-color:#ffffff;"| <br> '''Search''' | ||
|- | |- | ||
| locate | | locate | ||
Line 85: | Line 85: | ||
| | | | ||
|- | |- | ||
|colspan=" | |colspan="5" style="background-color:#ffffff;"| <br> '''System info''' | ||
|- | |- | ||
| uname | | uname | ||
Line 183: | Line 183: | ||
| | | | ||
|- | |- | ||
|colspan=" | |colspan="5" style="background-color:#ffffff;"| <br> '''Runlevel''' | ||
|- | |- | ||
| runlevel | | runlevel | ||
Line 215: | Line 215: | ||
| | | | ||
|- | |- | ||
|colspan=" | |colspan="5" style="background-color:#ffffff;"| <br> '''Network''' | ||
|- | |- | ||
| wget | | wget | ||
Line 289: | Line 289: | ||
| (extra package) | | (extra package) | ||
|- | |- | ||
|colspan=" | |colspan="5" style="background-color:#ffffff;"| <br> '''Apt''' | ||
|- | |- | ||
| apt install | | apt install | ||
Line 339: | Line 339: | ||
| | | | ||
|- | |- | ||
|colspan=" | |colspan="5" style="background-color:#ffffff;"| <br> '''HDD''' | ||
|- | |- | ||
| smartctl | | smartctl |
Revision as of 10:45, 9 December 2017
Command | Arguments | Info | Example | Other |
---|---|---|---|---|
Basic | ||||
dir | -Flah | list folder content | dir -Flah | |
cat | %file | show file content | cat config.txt | |
Files | ||||
mkdir | %dir | create dir | mkdir /var/test | |
rm | %file | remove file/dir | rm autoexec.bat | |
cp | %from %to | copy | ||
mv | %from %to | move | ||
dd | if=%in of=%out | low level copy | dd if=/dev/sda2 of=/dev/sdb2 | |
nano | (%file) | file editor | nano | |
vi(m) | %file | file editor | vi config.txt | |
Search | ||||
locate | %file | locate file | locate fstab | |
updatedb | update locate database | |||
find | / -n %filename | search for file | ||
System info | ||||
uname | -a | show kernel version | uname -a | |
free | -m | show free memory | free -m | |
fdisk | -l | |||
df | -Th | show harddisk usage | df -Th | |
du | ||||
ifconfig | show network settings | |||
ps | -aux | show processes | ps -aux | |
top | show processes with UI | |||
htop | (extra package) | |||
iotop | (extra package) | |||
iftop | (extra package) | |||
virt-top | (extra package) | |||
netstat | ||||
vnstat | show network interface statistics | (extra package) | ||
who, w | ||||
pwd | ||||
Runlevel | ||||
runlevel | ||||
init | %rlvl | |||
halt | ||||
reboot | ||||
shutdown | -h now | |||
Network | ||||
wget | download files | |||
ntpdate | (extra package) | |||
dig | get dns info | |||
whois | (extra package) | |||
nslookup | get dns info | |||
finger | (extra package) | |||
route | -n | show active routes | ||
traceroute | show network route to target address | |||
netstat | -tulpn | show open ports | netstat -tulpn | |
iwconfig | show wifi settings | |||
iwlist scan | scan for wifi networks | |||
nethogs | (extra package) | |||
Apt | ||||
apt install | <package> (-s = simulation) | |||
apt update | ||||
apt upgrade | ||||
apt dist-upgrade | ||||
aptitude | ||||
dpkg -c | ||||
dpkg --get-selections | ||||
/etc/apt/sources.list | ||||
HDD | ||||
smartctl | read smart info | |||
hdparm | set parameters | |||