I had an issue with my Ubuntu recently that the computer was not stopping screesaver and didn’t show me the login page after a screenlock. Most people usually try to forcefully shutdown by pressing and holding the power button for about 10 seconds. This is not a good choice specially when you have some services on that machine or having some other users logged in through SSH to that computer.
In this article I will briefly explain how to logout a specific user remotely through SSH without touching or terminating any service or any other user.
Continue reading Remote logout user through SSH
It has always been a great concern to keep track of folder permissions since most of the lame errors in Linux are due to a permission denial by the system, and sysadmins should change some permissions from time to time to fix things. At this point having a good record of what has been changed is vital since in terminal there is no undo or Ctrl+z and you should keep track of what you are doing to reverse the change and correct the mistakes.
In this post I briefly want to present some lines of code that can help you keep track.
Continue reading Save file/folder structure including permissions
There are several places where you need to map a network drive to your computer, for example when you are in a company network and you want to have the shared network drive of your company domain on your computer. The term “mapping” is a technical term for mounting or loading a network drive to a computer.
For this purpose there are more than one way to do it and map the network drive to your Mac OSX and in this article I’m explaining two of those ways which are easier, faster and safer, one from Finder window and the other one from Terminal.
Continue reading Map a network drive in Mac OSX
Q: How can we check the current running linux version?
A: The following commands are somehow distro-specific which means they may not work on all linux distros, so try them all. The distros which the following commands are tested has mentioned.
Continue reading Check current Linux version
Most of the times when you download a file from internet, you will see a checksum or MD5 hash tag beside the download link so you can compare the checksum of the downloaded file with the original file. There are several security reasons for that, but the most common one is to eliminate the possibility of a special type of hacking called “Man in the middle”. In this type of hacking, the hacker usually sniffs and listens to the requests goes from your computer and tries to compromise the packets, but the best thing you can do to help the hacker is to request a very popular application that he has already prepared an infected version, so when you want to download the file, he will send his own infected version toward your computer and you will install that application, thinking that it is the original malware-free application !! so after installing the application, the hacker can do variety of dangerous things to your computer such as creating a backdoor, key-logging, screen capturing, infecting the entire trusted network and etc.
The only way you can avoid this type of hack is by checking the checksums. there are few awesome, useful and easy commands that can do this checking for you and I’m going to describe them in this article:
Continue reading Generate & Compare MD5, SHA1 for Files and Strings in Terminal
This problem occurred to me when I was contributing with Folding@Home project of Stanford University. Their application (also known as fahclient) was using all my computers CPU and the temperature of my Mac’s graphic card was around 89 degrees centigrade. So I tried to limit the CPU usage of this application within it’s preferences menu, but it was not working at all, so I searched Internet and I found that this is a common problem an the solution was not that well-known ! So in this post I’m going to describe how to limit application CPU usage in Mac OSx. In this tutorial I’m going to use cputhrottle which is a small OS X command-line utility designed to limit the CPU usage of a process to which it attaches.
Continue reading Limit application CPU usage in Mac
Sometimes when you are working with your Linux and you face an error and you go to a forum or help center, they ask for your Linux version in order to help you. I’m going to describe how to get your Linux version.
Continue reading How to get Linux version and LSB
Sometimes when you install your OS, the network interfaces are not enabled, or the network setting has set to Static IP but with a wrong IP. So when you face these situations you should setup your network first, in order to get your server connected to the network.
Continue reading Setup-up Simple Network Settings
Most of the times when you want to setup a server for specific matter, it’s recommended to install the OS in minimal mode and install packages you want individually and configure them one by one. You can choose different ways to install your desired packages:
- Using YUM command
- Using RPM command
- Compiling each package
Each of these ways has it’s positive and negative points. that I’m going to write in brief:
Continue reading Installing packages on CentOS / RHEL
To be brief, yum is an application that helps you manage you managing other applications, eg. install, update, remove, search, etc. You can use the following command to see the manual:
# man yum
But I’m going to introduce this useful application in details:
Continue reading What is YUM Command?