Is it possible to ride 18km everyday for a beginner? I decided to ride to my university which is 9km away from my home and it is placed on a foothill. I guess the route is 5degrees uphill steep.

I have ridden short routes before but not as long as 18 km.. I'm a beginner in riding, but physically I'm partly OK.

EDIT:
This is the path's elevation profile from google earth:
The average slope is 4.6% and max slope is 13.1% and altitude is 1224 ft.
18km a day is not far, as long as you have an OK fitness level to start with and no health issues, it is certainly achievable, but...  

You will not get any rest days. I was once told, you do not get fit exercising, you get fit recovering. If you ride 5 days a week, there's no recovery time. This could lead to problems since each day's effort is stressing your body. For the beginning I would strongly recommend not more than 3 days (with a day between) until you are sure you can comfortably do five days every week. 

What I would suggest you to do is first thing in the morning measure your resting pulse rate. Do this for 3 or 4 mornings to establish a baseline. Start riding, taking it easy to begin with (for the first couple of weeks). Note how you feel and your resting pulse rate - if you feel bad and your pulse is higher than it should be, have a rest day or two. (Note - normally your resting pulse rate will fall as you get fitter, so your baseline will change.)

The trick is to have an alternative to riding available so you don't need to ride if you need a rest, but not so available that you use it all the time.