In this paper, the problem of the applications of HMM (hidden Markov model) to computer intrusion detection is discussed. Both first-order HMM and second-order HMM are tested to compare their performances of computer intrusion detection. HMMs are used to build a profile of normal activities on a computer from the training data of normal activities on the computer. The norm profile is then used to detect anomalous activities from testing data of both normal and intrusive activities on the computer for intrusion detection. Using the data set of DARPA 2000 LLDOS 1.0, our experiments show that first-order HMM reveals better intrusion detection performance than that of second-order HMM.