User is not in the sudoers file

I am working on fedora and using some commands which are related to sudo but there print a message
user is not in the sudoers file. This incident will be reported.
so here is how you get the sudo command to work.
user_name ALL=(ALL) ALL
Replace user_name with your own user ID

however, you have to use the visudo command to edit the file while being root
so, here is what you need to do:
open a new terminal
switch to root, type “su” then enter the root password
type “visudo” and you will see the sudoers file opened for editting go to the end of the file and type the line
user_name ALL=(ALL) ALL
Again, Make sure you replace user_name with your own user ID
then save and exit.
Now exit from root.
Then now type sudo any application(sudo gedit) and enter your password
if everything went well, you should see the gedit program.