You need to login as root, not admin. Permission denied means you are not logged in as root. The admin account does not have privileges to do this.
Login as root and try again. If you don't know root password, get it. I compile kernels all the time, and I always do it while logged in as root.
jplatt39
2012-10-13 04:53:31 UTC
Okay, I like to live dangerously so here are some thoughts:
I don't know which Linux you are using but I usually refer to it as logged in as root -- which you can't with Ubuntu and it's generally a bad idea but for this, well. Make sure if you are that you have a ful environment: if using su use su - which gives you the full root environment rather than making you root in your home environment.
Second. Sounds stupid but if /usr/src/ doesn't exist you might get that response. So check it out. Is it there?
Finally -- and I'm totally crazy as I said -- I run slackware. Among other things I keep my kernel source code (from git) in my home directory -- /home/myaccount which should be obvious. I run make oldconfig/menuconfig/xconfig, make and make modules as myself, and ONLY run make modules_install and mkinitrd as root. I don't use make install for arcane slackware-related reasons. There are alternatives (cp -v arch/x86/boot/bzImage /boot/vmlinuz). and of course I do them as root -- but from my home directory.
t
2012-10-13 02:54:12 UTC
Are you really executing it as root? Try 'sudo mv linux-2.6.x.tar.gz /usr/src'. If you don't have sudo, use 'su' to switch to root ('who am i' will tell you if it worked) and then execute the command normally.
Tip: 'sudo' needs your login password, 'su' needs root password. If you want to use 'su' but don't know root password, use 'sudo su' or set root password using 'sudo passwd root' (note that many linux distros recommend against it).
ⓘ
This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.