Linux file systems are generally robust and works very well. But it can happen errors rarely. How can we check and fix these file system errors? Fsck is a check and repair utility for Linux file systems. Fsck can check and repair one or more file system. File system can be a device or a mount point. If no file system is specified /etc/fstab entries are checked serially. List Mounts And File...
Run Level is preset operating state in Linux systems. Different run levels have different behaivour. How can we change these run levels easily? What are these run levels? Run Levels We will explain the run levels and their meanings in this section Run Level 0 is shutdown position. Linux system is powered off. Linun systems run levels transitioned to 0 to shut down. Run Level 1 is single user mode there is...
After installing updates it may needed reboot. Rebooting systems in office hours is a bad thing to happen. What can we do? We can set Linux system to restart after office hours with automated reboot. There are two ways to auto reboot. We will look both of them. Using At Command We can use at command to specify boot time. We can do different things with at like sending emails etc. Now we want...
I want to send my text to the python application as argument. The application will return the count of words in the text. Here is the basic but useful sample python application. Python Script We have following python script which is named sentence_word_count.py . It gets sentence as argument and split it according to spaces. Uses len() function in order to count elements in the given list.
print("Total Word Count:")
I have a FreeBSD box. I want to connect this system remotely with ssh. FreeBSD security settings are very restricted so we can not connect FreeBSD system with root user remotely. We will ssh with a regular existing user and then login as root with su command. The problem is regular existing user can not run su command. How can we give ability to run su command to regular user in FreeBSD? su Error When...
Linux servers used around the world dominantly in internet. They are used as web server, file server, application server etc. Being on internet creates som risk for these systems. There are different risks on the internet. One of them is automated attackers who uses scripts and tool in a automated fashion. Linux systems should be protected this type of attackers too. Here I will provide some tips about protecting our...
Ubuntu and Debian are two popular Linux distributions. They are using deb and apt for package management by default. In default repositories there are a lot of different and rich package alternatives. We may need to add some external repositories. PPA is a protocol used to add repositories to the apt. It means personal package archives. Some can create a package and publish it through his own server. Then we can easily add this package...
Apt is mainstream package management tool. Apt is used by Debian, Ubuntu and a lot of different distributions. Package administration job can be done with Apt very easily. Installing new packages, removing packages, updating packages, resolving dependency of packages etc. Big distributions like Debian, Ubuntu provides repositories. There are a lot of 3 party repositories provides uptodate and useful packages. How can we add these repositories to our Linux system?...
Working with cdrom’s requires root privilege. But how can we enable regular users to burn iso images to the cdrom. Cdrom devices can be access with cdrom user group. So we will add our current user to the cdrom group to give right to burn iso files. Add User To The Cdrom Group
$ usermod ismail -G cdrom
We can check the user new status like below Check Status
$ cat /etc/group | grep cdrom
Writing CD is an old fashion but a lot of server hardware all ready use CD-ROM. Writing ISO files into CD-ROM from bash can be seem very hard job. But it is not hard as it seem. Install Mkisofs, Cdrecord We will install tools named mkisofs and cdrecord into our system. Apt and Yum package installation is below. Debian, Ubuntu, Mint, Kali We can install mkisofs and cdrecord tools with the following commands In...