Mkdir results not obvious for me.


Results 1 to 3 of 3

Thread: Mkdir results not obvious for me.

  1. #1
    Join Date
    Feb 2018
    Posts
    2

    Mkdir results not obvious for me.

    I was trying to follow some instructions to set up a lineage OS build package on my latest version of Lubuntu PC. Everything was going ok until I got to a step that says now set up your directories for your build environment. To create them:

    mkdir -p ~/bin
    mkdir -p ~/android/lineage

    so I enter them in the terminal window at the line that says root@PC:/home/user/# and then nothing happens... no confirmation or error and the same root... line reappears. which is normal i believe.

    if I put in the command ls in the /home/user i dont see anything there by those names. If i check the higher directories nothing there either until I get to / where I find bin but as it is full of stuff I doubt I created that.

    but when I enter the CD command by itself i get ~# then if i enter ls I immediately see android bin home.

    But of course I dont understand where that is found?

    Can anyone explain what I misunderstand here please and what I should do? Many thanks

    George

  2. #2
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    I believe your command should be entered with "sudo" in the front.

    mkdir is a privileged command reserved for the root user (or Admin in Windows). An ordinary user can trigger it by adding sudo.

    Code:
    sudo  mkdir -p ~/bin
    The only exception is you issue it inside your home direectory where everything is owned by you so no root privilege is needed.

    Alway do a "ls" or "ll" command after you create the directory. "ls" is equivalent to the command "dir" in Dos/Windows command prompt
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  3. #3
    Join Date
    Feb 2018
    Posts
    2
    Quote Originally Posted by saikee View Post
    I believe your command should be entered with "sudo" in the front.

    mkdir is a privileged command reserved for the root user (or Admin in Windows). An ordinary user can trigger it by adding sudo.

    Code:
    sudo  mkdir -p ~/bin
    The only exception is you issue it inside your home direectory where everything is owned by you so no root privilege is needed.

    Alway do a "ls" or "ll" command after you create the directory. "ls" is equivalent to the command "dir" in Dos/Windows command prompt
    Very helpful. Thank you

    George

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •