Abstract The progress in the first-principles determination of the thermal equilibrium concentration profile at the surface of a random binary alloy is reviewed. After a brief introduction to the (single-site) coherent-potential approximation used to model concentrated alloys, and to the elements of density functional theory necessary for the ab initio treatment of such systems, three self-consistent Green function techniques for calculating ground-state properties of random alloy surfaces, namely the layer Korringa-Kohn-Rostoker (KKR), the screened KKR and the tight-binding linear muffin-tin orbital (LMTO) method are presented, with particular emphasis on the relationship between the latter two approaches. Although each of these methods is capable of yielding the internal energy of the system for any given profile, a ‘brute force’ search for the optimum configuration is unrealistic, in view of the large number of possibilities available. Instead, one uses the results of the above self-consistent calculations to construct an effective Ising model, which can then be treated by the standard methods of classical statistical mechanics. The two schemes currently used to generate the parameters of this effective Ising model are presented. The first, based on the treatment of Connolly and Williams for the study of phase stability in bulk alloys, consists in fitting the model parameters to the calculated internal energies of a sufficiently large number of composition profiles. The second, the generalized perturbation method (GPM), also first proposed in the context of bulk phase diagrams, derives them from the electronic structure of a reference system, relative to which the free energy of the actual configuration is expanded in powers of local concentration fluctuations. A detailed derivation of the GPM with respect to an arbitrary composition profile is given, in both the multiple-scattering and the tight-binding LMTO formalism, and recent developments of the method are discussed. Finally, the results of applications of the two approaches by different groups are presented.