We propose a simple way to define a field-line-following, general curvilinear coordinate system for a general magnetic field. This definition of field-line-following coordinate system reduces to a usual definition of dipole coordinate system when the magnetic field is approximated by an axisymmetric dipole. In this way, it can facilitate the numerical implementation by enabling validation of various metric terms computed numerically against those defined analytically in the case of dipole field. Steps involved in grid generation are also sketched. Highly accurate results are obtained using the high-order ordinary differential equation (ODE) solver to solve the general magnetic field line equations. The accuracy and consistency of the numerical implementation are validated against analytical results in the case of a dipole field. Numerical results show that this field-line-following coordinate system for the general magnetic field, like the coordinates for the dipole field, is also an Euler potential or Clebsch type coordinate system.