Category: Linux
-
How to Use RSYNC to Copy Files in Linux
The cp command in Linux is very handy and very flexible. However, there’s no easy way to resume copying a file if the process is interrupted. So we want to use rsync instead. Below is a simple example of how rsync can be used to copy a folder, and resume if the process is interrupted. When…
-
How to Use the History Command in Linux to Repeat Commands
Ever want to repeat the command you just entered? The “history” command gives you a method for repeating commands entered earlier in your session. You can control how many commands are remembered by putting a command in your .login file. set history=23 To see this history listing, enter the command “history”. You should see a…
-
How to Manually Update a GIT Application
This procedure should be used when a program that was installed using GIT fails to update. No need to run the commands as root. 1. Change directory to the folder where the program is installed: cd /home/myapp 2. Remove staged and working directory changes: git reset –hard 3. Update the program: git pull 4. All…
-
How to Rename a Network Interface in Linux
This procedure is useful when a new network card is installed and the system won’t initialize the new card. The problem is that the ID of old and new card is the same. For some reason the system does not automatically comment out or remove the entry of the old card. So you have to…
-
How to Resize a Partition on a Linux Virtual Machine using LVM
1. Check the current disk utilization: df -h 2. Increase the virtual disk size in vmWare 3. Mount the gParted ISO to the VM and set to automatically connect on boot 4. Reboot the VM 5. Use gParted to resize the partition. When done, change the CD/DVD drive back to client device and reboot. 6.…
-
How to change or reset root password in Linux
Say you work in an office where more than one person provisions and/or has root access on the Linux servers. Every now and then you’ll probably run into a situation where you don’t know the root password. Now if you have another account that can “sudo”, you’re not completely dead in the water. You can log in…