Alkyl compounds are chemical compounds formally derived from alkanes by replacement of one hydrogen atom with other atoms or functional groups. Alkyl compounds contain alkyl groups, CnH2n+1, and have the general formula CnH2n+1X, where X is any chemical element or group.