X
X
X
X

Knowledge Base

HomepageKnowledge BaseProblem of LinuxUbuntu creates a new user and mount...

Ubuntu creates a new user and mounts a partition for the user's home directory

Create user:

   sudo adduser test   // establish

   Sudo addUser test sudo / / give the newly created user root permission (optional)

  Sudo smbpasswd – a test / / create a samba user to facilitate windows access

Allocate disk space for users:

   Select the disk to be partitioned and command sudo fdisk - L to view it  

Disk partition:

  sudo fdisk /dev/sda

         Select parameter n to create a new partition

        Select the appropriate partition size, which is divided into 40g, K is KB, M is MB, G is GB, t is TB and P is Pb.

Format partition:

   Sudo mkfs.ext4 /dev/sda3

Mount partition to user:

   sudo mount -t ext4 /dev/sda3/   / home/test

      Use the DF - H command to view the mount

Finally, in order to mount the partition automatically at startup, you need to add a mount record in / etc / fstab

   echo "/dev/sda3  / home/test   ext4   defaults   0   2 " >> /etc/fstab

Can't find the information you are looking for?

Create a Support Ticket
Did you find it useful?
(303 times viewed / 0 people found it helpful)

Top