A method for random access, applied to a terminal, comprising: obtaining random access configuration information, wherein the random access configuration information comprises a random access resource corresponding to each bandwidth part, BWP; obtaining a target random access resource corresponding to a BWP for the terminal based on the random access configuration information; and initiating a random access procedure by using the target random access resource, characterized by that the random access configuration information further comprises one or more pieces of following information: indication information for indicating whether the random access resource is used for a contention based random access; and indication information for indicating whether the random access resource is used for a non-contention based random access, wherein the initiating the random access procedure by using the target random access resource comprises: activating, in a case that the target random access resource is not on a currently activated BWP for the terminal, the BWP where the target random access resource is located; and initiating, on the BWP where the target random access resource is located, the random access procedure by using the target random access resource, wherein in a case that the indication information for indicating whether the random access resource is used for the contention based random access indicates that the random access resource is used for the contention based random access, the initiating the random access procedure by using the target random access resource comprises: initiating a contention based random access procedure by using the target random access resource; and wherein in a case that the indication information for indicating whether the random access resource is used for the non-contention based random access indicates that the random access resource is used for the non-contention based random access, the initiating the random access procedure by using the target random access resource comprises: initiating a non-contention based random access procedure by using the target random access resource. obtaining random access configuration information, wherein the random access configuration information comprises a random access resource corresponding to each bandwidth part, BWP; obtaining a target random access resource corresponding to a BWP for the terminal based on the random access configuration information; and initiating a random access procedure by using the target random access resource, characterized by that the random access configuration information further comprises one or more pieces of following information: indication information for indicating whether the random access resource is used for a contention based random access; and indication information for indicating whether the random access resource is used for a non-contention based random access, wherein the initiating the random access procedure by using the target random access resource comprises: activating, in a case that the target random access resource is not on a currently activated BWP for the terminal, the BWP where the target random access resource is located; and initiating, on the BWP where the target random access resource is located, the random access procedure by using the target random access resource, wherein in a case that the indication information for indicating whether the random access resource is used for the contention based random access indicates that the random access resource is used for the contention based random access, the initiating the random access procedure by using the target random access resource comprises: initiating a contention based random access procedure by using the target random access resource; and wherein in a case that the indication information for indicating whether the random access resource is used for the non-contention based random access indicates that the random access resource is used for the non-contention based random access, the initiating the random access procedure by using the target random access resource comprises: initiating a non-contention based random access procedure by using the target random access resource. activating, in a case that the target random access resource is not on a currently activated BWP for the terminal, the BWP where the target random access resource is located; and initiating, on the BWP where the target random access resource is located, the random access procedure by using the target random access resource, wherein in a case that the indication information for indicating whether the random access resource is used for the contention based random access indicates that the random access resource is used for the contention based random access, the initiating the random access procedure by using the target random access resource comprises: initiating a contention based random access procedure by using the target random access resource; and wherein in a case that the indication information for indicating whether the random access resource is used for the non-contention based random access indicates that the random access resource is used for the non-contention based random access, the initiating the random access procedure by using the target random access resource comprises: initiating a non-contention based random access procedure by using the target random access resource.