Thursday, 28 August 2014

Linux Command for calculation - bc

bc Command in Linux with Example

bc is a command line basic calculator. bc is typically used as either a mathematical scripting language or as an interactive mathematical shell.

Doing arithmetic calculation use bc as below.

bc can be used with echo command


$ echo "3+5" | bc


$ echo "15-3" | bc

Wednesday, 27 August 2014

Samba Server Configuration in Linux

Configuring Samba Server

To install Samba run command

yum install samba samba-client samba-common

The Samba Configuration file is /etc/samba/smb.conf

Take a backup of this file before configuring any samba share using command
mv /etc/samba/smb.conf /etc/samba/smb.conf.bkp

Minimal smb.conf

Here is an example of a minimum configuration of smb.conf

$ cat /etc/samba/smb.conf
workgroup = WORKGROUP
path = /srv/samba/public

Tuesday, 26 August 2014

Cal Command in Linux

Linux Basic Command - cal to display calendar

Cal displays a simple calendar.  If arguments are not specified, the current month is displayed.  The options are as follows:
     -1      Display single month output.  (This is the default.)
     -3      Display prev/current/next month output.
     -s      Display Sunday as the first day of the week.  (This is the default.)
     -m      Display Monday as the first day of the week.
     -j      Display Julian dates (days one-based, numbered from January 1).

     -y      Display a calendar for the current year.

Monday, 25 August 2014

Daemons required for Samba Server

Samba daemons

Samba consists mainly three daemons nmbd, smbd and winbindd and one management service application SWAT.


The nmbd daemon takes care of all the names and naming. This daemon listens for name-server requests and provides the appropriate IP addresses when called upon. It registers and resolves names, and handles browsing. According to the Samba documentation, it should be the first daemon to start.

Saturday, 23 August 2014

Samba Server - Introduction and Installation

What is Samba?

Samba is an Open Source and Free Software suite that provides seamless file and print services to SMB/CIFS clients." Samba is freely available and used to communicate with Linux/Unix servers and Windows-based clients.

Samba implements the CIFS network protocol. Samba offers many services. It can share one or more directory tree. It also provides Windows Internet Name Service (WINS) name-server resolution and Distributed Filesystem (MS-DFS) namespace. It manages printers, print settings, and their associated drivers for access from Windows clients.