FYI, sudo is a program that allows you to run specific programs as a non-privileged user. su is the program that will 'upgrade' you to privileged level access.
To answer your question, read the man page for ifconfig by typing 'man ifconfig'. It will give you the knowledge to set your ip statically, along with a lot of other useful things, so it would behoove you to read it.
There are also methods in which to set your static ip on bootup so you dont have to do it manually every time your system boots. These are referred to as "init scripts". I'm not sure which ubuntu uses. I'm confident you can figure it out and configure it.
Here's a hint. If there are rc scripts (ie, rc.inet1), it is probably a bsd style init. If there are run levels, ie, a folder with a bunch of numbers (1,2,4, etc) with your startup scripts in it, it is SysV style init.