Useful linux commands in console
For process viewing purposes
For disc activity
File manager(can do FTP and SAMBA)
- du -sh *
For calculating directory sizes recursively.
- ssh -R port:host:hostport
If you need to get somewhere that has no open ports. Then you just connect to the local "port" and it will be tunneld to the "hostport" over ssh.
- df -h
View disc sizes
- free -m
View free memory
- cat /proc/cpuinfo
View information about the processors.
To see what PCI hardware we have
To see lots of information about the hardware(has also gtk-lshw with GUI)
- chroot /mnt/root /bin/bash
Chroot into a machine, for example when someone forgot the password you can boot a live-cd mount the root FS to /mnt/root and chroot into it and change the password. Or if you scre up the kernel and can't boot.
- gpasswd -a USER GROUP
Add a user to the group.
- nslookup IP|HOST
If you need to get the hostname by ip or ip by hostname, this is the thing to do.
- ./some_program >> /dev/null 2>&1
Send all output to /dev/null, meaning to disable all output.