Skip to main content

Posts

Showing posts with the label root

Linux commands

sudo!! : Forgot to run a command with sudo? You need not re-write the whole command, just type "sudo!!" and the last command will run with sudo. 2. Python -m SimpleHTTPServer : Creates a simple web page for the current working directory over port 8000. 3. mtr : A command which is a combination of 'ping' and 'traceroute' command. 4. Ctrl+x+e : This key combination fires up, an editor in the terminal, instantaneously. 5. nl : Outputs the content of text file with lines Numbered. 6. shuf : Randomly selects line/file/folder from a file/folder. 7. ss : Outputs Socket Statistics. 8. Last: Want to know history of last logged in users? This command comes to rescue here. 9. curl ifconfig.me : Shows machine's external IP Address. 10. tree : Prints files and folders in tree like fashion, recursively. 11. Pstree : Prints running processes with child processes, recursively. 13. stat : Shows the status information of a file as well as of a file s...

Extend the root partition in LVM - CentOS7

a) Use the following script: lvmmanagement_centos7-sh 1) Change the extension of the script to .sh. Place this script in /home/compose. 2) Give executable rights  chmod +x lvmManagement_Centos7.sh 3) Execute as  sudo sh  lvmManagement_Centos7.sh If you do not want to use the script follow the below mentioned steps: ssh to the VM and type  "df -h"  command to view the partitions and  "df -T"  for type of partitions. Type " sudo   lvs " command to show the logical volumes and volume groups Type " sudo fdisk -l ", here the newely added disk will be visible in /dev/sdb Type " sudo fdisk /dev/sdb " and press the following letters Press " n " for new partition Press " p " for primary partition Press " 1 " for default value of partition no. Let the value of first sector and last sector me deafult Press " t " for type of partition Press " 8e " for the hex code for LVM Partition ...

Extend the root partition in LVM - CentOS7

a) Use the following script: lvmmanagement_centos7-sh 1) Place this script in /home/compose. 2) Give executable rights  chmod +x lvmManagement_Centos7.sh 3) Execute as  sudo sh  lvmManagement_Centos7.sh If you do not want to use the script follow the below mentioned steps: ssh to the VM and type "df -h" command to view the partitions and "df -T" for type of partitions. Type " sudo   lvs " command to show the logical volumes and volume groups Type " sudo fdisk -l ", here the newely added disk will be visible in /dev/sdb Type " sudo fdisk /dev/sdb " and press the following letters Press " n " for new partition Press " p " for primary partition Press " 1 " for default value of partition no. Let the value of first sector and last sector me deafult Press " t " for type of partition Press " 8e " for the hex code for LVM Partition Press " p " to print the value Press " ...