Using the Host File in Ubuntu

You can use the host file to have your computer route to whatever addresses you desire (instead of using your nameserver). For example, by putting

[bash]sudo nano /etc/hosts[/bash]

Then add a line to the file with the ip address and the name you will use.
[bash]204.11.50.136 wastetime[/bash]

One useful way to use this is to test out a website on a new host prior to changing the nameserver to point to the new host. In this case, if you want to make sure your host file is being read you can ping wastetime and if it is working it will show the results for a ping to 204.11.50.136

Ubuntu/Linux cli syntax

Command line interface syntax for various actions

Make new directory, make [directory_name]

[bash]sudo mkdir new_directory[/bash]

Remove (file or directory)

rm [name]
[bash]rm -i file_to_remove.txt[/bash]
Using -i prompts you to confirm the deletion.
Remove directory and all of its contents without having to confirm. Obviously be careful.
[/bash]sudo rm -r directory_to_remove[/bash]

Move a file

mv [name] [new_location]
[bash]mv file.txt new_sub_directory/file.txt[/bash]

Rename a file (similar to moving)
mv [name] [new_name]
[bash]mv file.txt new_file_name.txt[/bash]

Copy a fold

cp -r [folder]/* [new_location]
[bash]cp -r folder/* /some_place/else/[/bash]

Keep ssh sessions live

If you want to stop your SSH sessions from being shut down you can add the following line to /etc/ssh/ssh_config on your local machine.
[bash]sudo gedit /etc/ssh/ssh_config[/bash]
Then add:
[bash]ServerAliveInterval 30[/bash]
This does remove the security feature of closing your session in case you leave your computer, but you may decide to take that risk. This sends a SSH package every 30 seconds so your server doesn’t close the connection due to inactivity.

Edit DNS Name Server

Set the DNS name server to use for your machine.

[bash]sudo nano /etc/resolv.conf[/bash]

Then you can use for example (8.8.8.8 is Google public DNS, 208.67.222.222 is OpenDNS):
[bash]nameserver 208.67.222.222
nameserver 8.8.8.8[/bash]

[bash]sudo lshw[/bash] will provide infor on your system, CPU types, 32 v 64 bit…