A federal inmate in West Virginia has been sentenced to life in prison in the fatal stabbing of another inmate.