what is etc profile file in Linux

Ads
 

what is etc profile file in Linux

Hi,

I want to know more about the /etc/profile file in Linux.

What is the use of /etc/profile file?

Thanks

View Answers

May 21, 2018 at 12:32 AM

Hi,

The profile file:

/etc/profile

Is very import file in Linux system. This file is used to set the system wide environment variable. If you set any variable in this file it will be available for all the users of the system.

You can use the vi editor in Linux terminal to do so:

vi /etc/profile

Then add variable of choice.

For example to set system wide JAVA_HOME you can add following line:

export JAVA_HOME=/opt/software/jdk1.8

Thanks


May 21, 2018 at 12:33 AM

Hi,

check one real example at:

how to install anaconda in ubuntu for all users?

Thanks

Ads









Related Tutorials/Questions & Answers:
what is etc profile file in Linux
what is etc profile file in Linux  Hi, I want to know more about the /etc/profile file in Linux. What is the use of /etc/profile file? Thanks   Hi, The profile file: /etc/profile Is very import file in Linux
What is Linux?
What is Linux?        ...; Linux is a free Unix-type operating system originally developed by Linus... of GNU worked together to develop what we now take for granted, a derivative
Advertisements
unzip file in LInux
unzip file in LInux  Hi, I am working on a Linux project and we have to extract large number of zip files. I don't have the desktop access.... Now I have to unzip a zip file into a directory. How I can do this? Thanks
unzip file in LInux
unzip file in LInux  Hi, I am working on a Linux project and we have to extract large number of zip files. I don't have the desktop access.... Now I have to unzip a zip file into a directory. How I can do this? Thanks
Deploying website war file on linux
Deploying website war file on linux  I have BOLLYWOOD_MIRROR.war file.I want to host it on linux server on path. After deployment of war file its... guidance of hosting war file on linux Thank you
how to check the size of a tar file in linux
how to check the size of a tar file in linux  Hi, I want to check the size of tar file in Linux. How to check the size of a tar file in linux? What Linux command I should use to check the size of a tar file? Thanks
What is Linux?
What is Linux?        ...;      Linux is an Unix based Complete... Linux was developed for x86, but now it runs on the various platforms
Uploading a Profile with image[file] into a sql database
Uploading a Profile with image[file] into a sql database  I need to upload a file along with the some text into a database ......[ Similar to http... , but upload file to database ] ... Pls help
What is Linux Hosting?
Linux is an operating system that is developed and licensed as open source software that can be accessed by any web developer and services. Linux... and cloud services. Presently along with Windows hosting services Linux hosting
What is a file Separator?
What is a file Separator?  What is a file separator in Java Program?   Hi, The file separator is nothing but a character that we used to separate directory path names for a particular location. These file separator
What is robot.txt file?
What is robot.txt file?  Hi, What is robot.txt file? Thanks   Hi, The robot.txt file is places in the root of the website. It allows... of your website. Here is example of robot.txt file: User-agent: * Allow
How to extract a zip file to a folder in Linux?
How to extract a zip file to a folder in Linux? Step by step command... command to extract a zip file to directory of your choice. What is unzip... the unzip tool to zip a file. Related Linux tutorials
How do I compress a tar file in Linux
How do I compress a tar file in Linux  Hi, I want to create the tar.gz file file of a directory in Linux. My directory contains many sub directories... for creating tar of directory and all the contents inside it. the created tar file should
How do I compress a tar file in Linux
How do I compress a tar file in Linux  Hi, I want to create the tar.gz file file of a directory in Linux. My directory contains many sub directories... for creating tar of directory and all the contents inside it. the created tar file should
How do I compress a tar file in Linux
How do I compress a tar file in Linux  Hi, I want to create the tar.gz file file of a directory in Linux. My directory contains many sub directories... for creating tar of directory and all the contents inside it. the created tar file should
Create tar.gz file in Linux command line
How to create tar.gz file in Linux? In this tutorial I will show you how to create tar.gz file in Linux? We are going to use the Linux console and then run... directory name or file name for adding into the tar.gz file. Linux tar command
df in linux not showing correct free space after file removal
df in linux not showing correct free space after file removal  Hi, I have deleted a big file in linux but df is not showing correct free space after... is not showing the file. How to resove this issue? df in linux not showing correct
what is hibernate dtd file location
what is hibernate dtd file location  Hi, I am trying to find dtd of Hibernate online but not able to find. what is hibernate dtd file location Thanks
How to delete content of a log file from linux terminal?
How to delete content of a log file from linux terminal?  Hi, My production server is on the linux machine. I am trying to debug and find the slow...-queries.log file. Can anyone tell me how to do this? Thanks   Hi, Its
Where is my.cnf in linux?
Where is my.cnf in linux?  Hi, Can anyone tell me where is my.cnf in linux? Thanks   Hi, Its is /etc folder. The complete path with file name is /etc/my.cnf. Thanks
jsf application war file not running in my jboss 6.0 on linux 5.5
jsf application war file not running in my jboss 6.0 on linux 5.5  17:15:47,647 INFO [config] Initializing Mojarra (1.2_08-b06-FCS) for context '/MFPMSDeployment' 17:15:48,354 INFO [TomcatDeployment] deploy, ctxPath=/ 17
What are the concepts and purpose of Spring configuration file.
What are the concepts and purpose of Spring configuration file.  Hi, What are the concepts and purpose of Spring configuration file. Thanks
The Beginners Linux Guide
The Beginner's Guide to Linux Dedicated website to Linux containing Online Resource, Links to Linux Resources and Tutorials. Here you will find a lot of tutorials and information about the Linux. What is Linux
If I open .class file with notepad what is displayed?
If I open .class file with notepad what is displayed?   What is displayed when we open java .class files with notepad
What is the best way to write to file in Java?
What is the best way to write to file in Java?  I am creating a program in Java which writes into a text file. What can be the be best method to write to a text file in Java? Since my program will continuously write the data
What is the root level element in a hibernate mapping file?
What is the root level element in a hibernate mapping file?  Hi, What is the root level element in a hibernate mapping file? This question was asked in Hibernate mapping file. Thanks   Hi, The root element
We are providing Linux CD's for free.
Mandrake Linux Linux! Linux! Linux! The Best Place to get your Free Linux Mandrake 9.1 CD's Get Your Linux CD's Today What is Linux? Linux is a free... source Unix-like OS. The code for Linux is freely available to everyone under GNU
What is the fastest way to read a file in Java?
What is the fastest way to read a file in Java?  Hi, I am reading my file using the Scanner class. My code is below: import java.io.*; import... have to read text file of 10GB and then process the lines for getting the data
We are providing Linux CD's for free.
Linux! Linux! Linux! The Best Place to get your Free Linux CD's Get Your Linux CD's Today Result of 14-Jan-2003 Red Hat 8.0 Free CD Contest   What is Linux? Linux is a free Operating System, Which was developed by Linus
I have one small doubt , does this code read Microsoft Office suit file format data such as .doc , .docx etc ?
I have one small doubt , does this code read Microsoft Office suit file format data such as .doc , .docx etc ?  import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; public class ReadFileExample
Reading the data from property file from java stand alone application in linux
Reading the data from property file from java stand alone application in linux  Please send me the example of reading the data from a property file from java stand alone application in linux. I don't know how to give path

Ads