We propose a general likelihood-based approach to the linkage analysis of qualitative and quantitative traits using identity by descent (IBD) data from sib-pairs. We consider the likelihood of IBD data conditional on phenotypes (discrete or continuous) and test the null hypothesis of no linkage between a marker locus and a gene influencing the trait using a score test in the recombination fraction $\theta$ between the two loci. This method unifies the linkage analysis of qualitative and quantitative traits into a single inferential framework, yielding a simple and intuitive test statistic. The score statistic readily extends to accommodate incomplete IBD data at the test locus, by using the hidden Markov model implemented in the programs MAPMAKER/SIBS and GENEHUNTER to obtain the multipoint inheritance distribution for each sib-pair (Kruglyak and Lander (1995) and Kruglyak et al. (1996)). The linkage score test is derived under general genetic models, which may include multiple unlinked genes. Population genetic assumptions, such as random mating or linkage equilibrium between the trait loci, are not required. This score test is thus particularly promising for the analysis of complex human traits. Conditioning on phenotypes avoids unrealistic random sampling assumptions and allows sib-pairs from differing ascertainment mechanisms to be incorporated into a single likelihood analysis. It allows in particular the selection of sib-pairs based on their trait values and the analysis of only those pairs having the most informative phenotypes. A further advantage of the score test is that it is based on the full likelihood, i.e. the likelihood based on all phenotype data rather than just differences of sib-pair phenotypes. Considering only phenotype differences, as in Haseman and Elston (1972) and Kruglyak and Lander (1995), may result in important losses in power. Simulation studies indicate that the linkage score test generally matches or outperforms the Haseman-Elston test, the largest gains in power being for selected samples of sib-pairs with extreme phenotypes.