Posts

Showing posts from October, 2021

Linux concepts by durga soft

Image
1.Create 10 directories and 5 files in each directory A. mkdir dir{1..10} && touch dir{1..10}/file{1..5} 2.Open 2 terminals parallely and redirect output to from one terminal to other A.  In linux every thing is tretaed as a file.So get the file corresponding to current terminal using tty command in terminal 1 and redirect ouput from terminal 2 to terminal 1         a)Open 2 terminals, either ssh sessions or 2 terminals        b)Execute tty command in terminal 1, it will display file corresponding to current terminal session          Eg:/dev/pts/1        c)switch to terminal 2 and execute below command        echo "This is sample text" >> /dev/pts/1        d)now you can observe the ouput will be redirected to terminal 1  3. Difference between mnt and media in linux file system, which is used for mounting If you plug in an external device it...

Storage Management in linux

 Add new disk to Linux:(Disk Management) 1.Traditionl fdisk 2. LVM Start reading those 4 blogs to cover all topics: Create partitions: here Extend partitions: here Delete partitions: here Logical volume manager: here dditional points I would like to add in lvm are: If you create partions using method one, then you need to pass option of parttions in pvcreate Eg: pvcreate /dev/sdb1 /dev/sdc1(Instead of /dev/sdb and /dev/sdc) If you follow method 1 for creating partitions, don't forget to use 'partprobe' command after creating partions using fdisk, because kernel shoud know the partions created. Extending LVMs: here 1.Traditionl fdisk Clear video: here   and clear notes here   and very imp notes here (Creating logical partions using extended partitions) In MBR partition scheme it allows us to create a maximum of 4 partitions only, in order to create more partition we have to choose the extended partition, from this extended partition we can create more logical par...