I found a faster way to change your display from terminal.

To check what resolution does your monitor support type:

adamz@UBUNTU:~$ xrandr -q

It will show something like this:

adamz@UBUNTU:~$ xrandr -q
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 4096 x 4096
VGA1 connected 1024×768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1360×768 59.8
1024×768 60.0*
800×600 60.3 56.2
848×480 60.0
640×480 59.9 59.9

Example I’m on 800×600 resolution and I want to change to 1024×768. I type this:

adamz@UBUNTU:~$ xrandr -s 1024×768

Thats it!

If you want to specify a refresh rate when switching your resolution, you can do it like this:

adamz@UBUNTU:~$ xrandr -s 1024×768@75