Strange error on bash launch
I get the following error whenever I launch bash:
Code:
mkdir: cannot create directory `/dev/cgroup/cpu/user/5900': No such file or directory Code:
if [ "$PS1" ] ; then |
If you don't know what this code is supposed to do, you can just ignore it and comment it out (until you find why it's there). Anyway, it should create a directory whose name is the process ID of the current shell ($$). It fails because the parent directory /dev/cgroup/cpu/user does not exist. The if [ "$PS1" ] part denotes it must be an interactive shell, PS1 being the environment variable which sets the appearance of the shell prompt.
|
Did you install a custom kernel? Seems to me that your kernel lacks the support for cgroups.
|
At a guess I'd say its failing because you're logging in as a non-root user and trying to write to /dev which typically is not set to allow such writes.
As to why it is in your .bashrc in the first place I can't say. Did you maybe copy this from an older system? Is this a new user and it got copied in from /etc/skel? The "$$" is the process ID for the bash shell that ran it which was 5900 when you ran it but would be different the next time. What Linux distro are you running? (RHEL? SUSE? Ubuntu? Something Else?) What version of that distro? What does "ls -ld /dev" show? What does "df -h /dev" show? /dev isn't a real filesystem so has no mount device. Its purpose is to hold all the special devices for various hardware on the system such as your hard drives (/dev/sd*, /dev/hd*), your serial ports (/dev/tty*) your pseudo terminals (/dev/pts/*) and a slew of others. Typically user processes wouldn't be creating anything in /dev though they are doing quite a bit of interaction with the devices that are already there. |
You will not be able to succeed because you usually need root privileges to write to the /dev directory. What user is the .bashrc running as ?
|
I did not install a custom kernel.
I am using ElementaryOS an Ubuntu derivative based off of 10.04 Code:
$ ls -ld /dev Code:
$ df -h /dev if [ "$PS1" ] ; then mkdir -m 0700 /dev/cgroup/cpu/user/$$ echo $$ > /dev/cgroup/cpu/user/$$/tasks echo "1" > /dev/cgroup/cpu/user/$$/notify_on_release fi |
Don't assume: who did you login as? Also, for confirmation try the id http://linux.die.net/man/1/id cmd.
As above, it's an odd place to create a dir from the cmd line & you'd have to be root to do it. Is there a particular reason you are trying to do this? If not, as above, just comment that block out, or even delete it... |
I logged in through my graphical login manager, when running gnome-terminal I do not log in again. I am not trying to do this, it was in my .bashrc by default. I will contact them I guess.
|
All times are GMT -5. The time now is 05:42 PM. |