Linux/1-Commands: Difference between revisions

From Wiki
No edit summary
No edit summary
Line 182: Line 182:
|-
|-
|colspan="4" style="background-color:#ffffff;"| <br> '''Network'''
|colspan="4" style="background-color:#ffffff;"| <br> '''Network'''
|-
| pppoeconf
|
|
|
|-
|-
| wget
| wget
|
|
|
| download files
|
|
|-
|-
| ntpdate
| ntpdate
|
|
|
| (not a default package)
|
|
|-
|-
| dig
| dig
|
|  
|
| get dns info
|
|
|-
|-
| whois
| whois
|
|
|
| (not a default package)
|
|
|-
|-
| nslookup
| nslookup
|
|
|
| get dns info
|
|
|-
|-
| finger
| finger
|
|
|
| (not a default package)
|
|
|-
|-
| route
| route
| -n
| -n
|
| show active routes
|
|
|-
|-
| traceroute
| traceroute
|
|
|
| show network route to target address
|
|
|-
|-
| netstat
| netstat
| -tulpn
| -tulpn
|
| show open ports
|
| netstat -tulpn
|-
|-
| iwconfig
| iwconfig
|
|
|
| show wifi settings
|
|
|-
|-
| iwlist scan
| iwlist scan
|
|
|
| scan for wifi networks
|
|
|-
|-

Revision as of 10:37, 9 December 2017

Command Arguments Info Example

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 (not a default package)
iotop (not a default package)
iftop (not a default package)
virt-top (not a default package)
netstat
vnstat show network interface statistics (not a default package)
who, w
pwd

Runlevel
runlevel
init %rlvl
halt
reboot
shutdown -h now

Network
wget download files
ntpdate (not a default package)
dig get dns info
whois (not a default package)
nslookup get dns info
finger (not a default 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

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