You cannot just get US residency because you are a student; you have to be sponsored for permanent residence either by an employer on the basis of a valid offer of employment or by a qualifying family member (parent, child, sibling, spouse/fiance).  Once you have one of those bases, then you can apply for the permanent residence through either employment-based or family-based process.