12th June 2008
This is not an extensive list of the terminal commands, it is intended as a quick reference of the commands i used during my Ubuntu server setup, in no particular order.
| Action | Command |
|---|---|
| Edit network interfaces | pico /etc/network/interfaces |
| Edit resolve.conf | pico /etc/resolve.conf |
| Edit sources.list | pico /etc/apt/sources.list |
| Interrupt or Stop a command | Ctrl C |
| Start ssh | /etc/init.d/ssh start |
| Restart ssh | /etc/init.d/ssh restart |
| Tunnel to server | ssh root@your_server_ip |
| Edit smb.conf | pico /etc/samba/smb.conf |
| Edit smbusers | pico /etc/samba/smbusers |
| Start Samba | /etc/init.d/samba start |
| Enable Root Account | sudo passwd root |
| Restart Server | shutdown -r now |
| Shutdown and Halt the Server | shutdown -h now |
| Edit fstab | gksudo gedit /etc/fstab |
| Mount all in fstab | sudo mount -a |
| Ram Usage | free -mt |
| Disk Space Available | df -h |
| Current Directory | pwd |
| Space used by a directory | du -h |
| Snapshot of running processes | ps -efH |
| Dynamic view of running processes | top |
| Ubuntu version installed | lsb_release -a |
| Currently loaded kernel modules | lsmod | head |
| Monitor network I/O | watch –interval 0.5 netstat -i inet |
| Listening ports and their owning processes | sudo netstat -luntp |
| View the firewall rules | sudo iptables -L |
| Restart networking. | sudo /etc/init.d/networking restart |