Praise be to Allah.
Shaykh al-Islam Ibn Taymiyah was asked the following question:
I ask the shaykh and imaam, the follower of the salaf (earlier generations) and the leader of the later generations, the most knowledgeable man whom I have met in the east or the west, Taqiy al-Deen Abu’l-Abbas Ahmad Ibn Taymiyah, to explain to me the best means of earning a living.
He (may Allah have mercy on him) answered as follows:
The best way of earning a living is to put one’s trust in Allah and have faith that He is Able to take care of you, and to think well of Him. That means that one who is keen to earn a living should turn to Him and call upon Him, as Allah said, according to the report (hadeeth qudsi) in which His Prophet (peace and blessings of Allah be upon him) said: “ ‘All of you are hungry except those whom I feed; ask Me for food and I will feed you. All of you are naked except those whom I clothe. Ask Me to clothe you and I will clothe you.’” And al-Tirmidhi narrated from Anas (may Allah be pleased with him) that the Messenger of Allah (peace and blessings of Allah be upon him) said: “Let each one of you ask his Lord for whatever he needs, even if it is a thong for his sandal when it breaks, for if Allah does not make it easy for him, he will not be able to fix it.” (A similar reports from Umm al-Mu’mineen ‘Aa’ishah (may Allah be pleased with her) has been classed as saheeh. See al-Silsilah al-Da’eefah, no. 1362).
Allah says in His Book (interpretation of the meaning):
“… and ask Allah of His Bounty”
[al-Nisa’ 4:32 – check this is the right quote]
“Then when the (Jumu‘ah) Salah (prayer) is ended, you may disperse through the land, and seek the Bounty of Allah (by working)…”[al-Jumu’ah 62:10]
Although this refers to Jumu’ah (Friday prayers), the meaning applies to all the prayers.
Hence – and Allah knows best – the Prophet (peace and blessings of Allah be upon him) told us to say when entering the mosque, “Allahumma iftah li abwaab rahmatika (O Allah, open to me the gates of Your mercy),” and when leaving the mosque to say, “Allahumma inni as’aluka min fadlika (O Allah, I ask You of Your Bounty).” And Ibraaheem the close friend of Allah (peace be upon him) said:
“so seek your provision from Allah (Alone), and worship Him (Alone), and be grateful to Him”
[al-‘Ankaboot 29:17 – interpretation of the meaning]
This is a command, and a command demands a response. So seeking the help of Allah, turning to Him with regard to the matter of provision and other matters, is an important principle.
Then one should seek to earn money with self-respect and pride, so that Allah may bless it for him; one should not take it with an attitude of desperation and greed. Rather money should be like the toilet, which one needs but which does not hold any special place in one’s heart. Striving to earn money should be like striving to fix the toilet. According to a marfoo’ hadeeth which was narrated by al-Tirmidhi and others, “Whoever wakes up and this world is his main concern, Allah will make him scattered and shattered, and he will feel a sense of panic and loss, and he will get nothing of this world except that which was already decreed for him. But whoever gets up and is mostly concerned about the Hereafter, Allah will cause him to feel focused and content, and will give him a feeling of being independent, and worldly gains will come to him willingly or unwillingly.”
One of the salaf said: You are in need of this world but you are in greater need of your share of the Hereafter. If you start with your share of the Hereafter, then your share of this world will automatically come with it. Allah says (interpretation of the meaning):
“And I (Allah) created not the jinn and mankind except that they should worship Me (Alone).
I seek not any provision from them (i.e. provision for themselves or for My creatures) nor do I ask that they should feed Me (i.e. feed themselves or My creatures).
Verily, Allah is the All-Provider, Owner of Power, the Most Strong” [al-Dhaariyaat 51:56-58]
With regard to specifying a particular means of earning a living, whether it be in industry, business, construction, farming, etc., this varies from one person to another. I do not know of any general ruling, but if there is a direction that a person wants to take, then let him seek the guidance of Allah and pray istikhaarah as taught by the teacher of all good (peace and blessings of Allah be upon him), for there is such great blessing in that that it cannot be comprehended, then whatever is made easy for him, he should be content with that, unless it is something which is objectionable on Islamic grounds.