It's far from optimal but it's better than nothing. Other factor is when people say they have weights they usually actually have **** all weight, especially in the context of training your legs.
But if you don't count warm up time and lift for 10mins then you should be able to get in a few decent sets. You probably want to do around 2mins rest, lets say your set takes 30s (don't actually time it) then you have 4 work sets. Then you want most result for your effort exercises so compounds- moving more than one joint. Something like:
M- squat 4x5
T- pull ups or chin up, start with negative if need be
W- overhead press 4x5
T-deadlift 1x5, squat 3x5
F-bench press 4x5
S- bent over row 4x5
S- rest or curls if you must
each session add 5kg to squat and deadlift, 2.5kg bench, row and press. If you fail to get the required reps then repeat, if you fail twice decrease weight by 10%. If you find yourself needing to reset quite soon after another reset then decrease the weight added each session. Start with 20kg (10kg each is using dumbells) on everything, it's light but lets you learn form and adding weight every week adds up quick. This is likely where you quickly realise you don't have enough weight at home and that's why most people join gyms.
If you don't have a rack to squat out of then at first you should still be able to lift the weight onto your back, in time you might switch to front squats and learn to power clean the weight up. This will also become a problem in time which again join a gym.
If you don't have a bench then there's no real alternative in terms of strength exercises but for vanity lifting you can do flies for pecs then you probably want to add in something for triceps though two exercises takes more time