Skip to main content

Posts

Featured

TechBytes on Linux

This is a growing list of Linux commands which might come handy for the newbies of Linux. 1. Found out i had to set the date like this:    # date -s 2007.04.08-22:46+0000 2. Mounting     sudo mount -t cifs // < pingable_host_or_ip > / < win_share_name > /build -o user= ,domain= ,uid=string,gid=string 3. To install linux packages from internet (ubuntu only)     apt-get install 4. To determine what ports the machine is currently listening on     netstat -an | grep -i listen | less 5. Find in files in Linux     find . | xargs grep 'string' -sl 6. To become superuser/root     sudo -i 7. To find a running process using name ps -aef | grep "searchstring" 8. Alt + F2 opens run window in RHEL 9. To access windows share from linux smb:// /d$ 10. To know the last reboot date & time $ last reboot | head -1 11. To install RPM packages in RHEL rpm -ivh 12. To un-install RPM package in RHEL rpm -e 13. To display Linux Kerne
Recent posts

How to Fix “Cannot find a valid baseurl for repo” in CentOS

Perform the steps as mentioned in this article to fix the yum repo mirrorlist URL issues. This worked for me just fine.  https://www.tecmint.com/fix-cannot-find-a-valid-baseurl-for-repo/  If you are getting Bad Gateway error related to fastestmirror. Do the following. vi /etc/yum/pluginconf.d/fastestmirror.conf Change  enabled=1  to  enabled=0  to disable the fastestmorror plugin. That should fix it.

Git Commands Cheat Sheet

  Here are some basic Git commands: Commands  Description git add <file> Adds a specific file to the staging area. git add . or git add –all Adds all modified and new files to the staging area. git status Shows the current state of your repository, including tracked and untracked files, modified files, and branch information. git status –ignored Displays ignored files in addition to the regular status output. git diff Shows the changes between the working directory and the staging area (index). git diff <commit1> <commit2> Displays the differences between two commits. git diff –staged or git diff –cached Displays the changes between the staging area (index) and the last commit. git diff HEAD Display the difference between the current directory and the last commit git commit Creates a new commit with the changes in the staging area and opens the default text editor for adding a commit message. git commit -m “<message>” or git commit –message “<message>” Cre