Can you unlock an Iphone when you don't know the password and your computer won't install ITunes?

My friend gave me his old Iphone and said "if you can unlock it you can keep it" because he d forgotten the password and got a new phone, is there any possible way to unlock it without going to a shop or anything if my computer won't install iTunes?

You need itunes to restore to factory setting

I thought so because I can't find anything that says I can do it without:/ thanks