A random access method, applied to a terminal device, wherein the method is applied to an unlicensed frequency band, the method comprises: determining, by the terminal device, a target uplink Bandwidth Part, BWP, by Listen Before Talk, LBT; and initiating, by the terminal device, a random access procedure on the target uplink BWP, wherein the initiating, by the terminal device, the random access procedure on the target uplink BWP comprises: initiating, by the terminal device, a contention-based random access procedure on the target uplink BWP, wherein the method further comprises: when the terminal device performs LBT on a currently activated first uplink BWP and fails, switching the currently activated uplink BWP from the first uplink BWP to a second uplink BWP, wherein the second uplink BWP is an uplink BWP configured by a network device; and when the terminal device performs LBT on the second uplink BWP and succeeds, determining the second uplink BWP as the target BWP, wherein when the terminal device performs LBT on the currently activated first uplink BWP and fails, switching the currently activated uplink BWP from the first uplink BWP to the second uplink BWP, comprises: when the terminal device performs LBT on the currently activated first uplink BWP and a number of failures is greater than or equal to a first threshold value, switching the currently activated uplink BWP from the first uplink BWP to the second uplink BWP. determining, by the terminal device, a target uplink Bandwidth Part, BWP, by Listen Before Talk, LBT; and initiating, by the terminal device, a random access procedure on the target uplink BWP, wherein the initiating, by the terminal device, the random access procedure on the target uplink BWP comprises: initiating, by the terminal device, a contention-based random access procedure on the target uplink BWP, wherein the method further comprises: when the terminal device performs LBT on a currently activated first uplink BWP and fails, switching the currently activated uplink BWP from the first uplink BWP to a second uplink BWP, wherein the second uplink BWP is an uplink BWP configured by a network device; and when the terminal device performs LBT on the second uplink BWP and succeeds, determining the second uplink BWP as the target BWP, wherein when the terminal device performs LBT on the currently activated first uplink BWP and fails, switching the currently activated uplink BWP from the first uplink BWP to the second uplink BWP, comprises: when the terminal device performs LBT on the currently activated first uplink BWP and a number of failures is greater than or equal to a first threshold value, switching the currently activated uplink BWP from the first uplink BWP to the second uplink BWP. initiating, by the terminal device, a contention-based random access procedure on the target uplink BWP, wherein the method further comprises: when the terminal device performs LBT on a currently activated first uplink BWP and fails, switching the currently activated uplink BWP from the first uplink BWP to a second uplink BWP, wherein the second uplink BWP is an uplink BWP configured by a network device; and when the terminal device performs LBT on the second uplink BWP and succeeds, determining the second uplink BWP as the target BWP, wherein when the terminal device performs LBT on the currently activated first uplink BWP and fails, switching the currently activated uplink BWP from the first uplink BWP to the second uplink BWP, comprises: when the terminal device performs LBT on the currently activated first uplink BWP and a number of failures is greater than or equal to a first threshold value, switching the currently activated uplink BWP from the first uplink BWP to the second uplink BWP. when the terminal device performs LBT on a currently activated first uplink BWP and fails, switching the currently activated uplink BWP from the first uplink BWP to a second uplink BWP, wherein the second uplink BWP is an uplink BWP configured by a network device; and when the terminal device performs LBT on the second uplink BWP and succeeds, determining the second uplink BWP as the target BWP, wherein when the terminal device performs LBT on the currently activated first uplink BWP and fails, switching the currently activated uplink BWP from the first uplink BWP to the second uplink BWP, comprises: when the terminal device performs LBT on the currently activated first uplink BWP and a number of failures is greater than or equal to a first threshold value, switching the currently activated uplink BWP from the first uplink BWP to the second uplink BWP.