Saturday, December 26, 2020

Chapter 11 : Setting up the environment for the "lfs" user

Hi,

In this chapter, we are going to setup the environment for the "lfs" user.

As part of setting up the environment, we are going to create two files namely

1. .bash_profile

2. .bashrc

3. .profile

Open a terminal and execute the following commands, keep that in mind...now you should have logged in as lfs user at the terminal.

Use the content below to create .bash_profile file 

cat > ~/.bash_profile << "EOF"

exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash

EOF


Use the content below to create .bashrc file
cat > ~/.bashrc << "EOF"
set +h
umask 022
LFS=/mnt/lfs
LC_ALL=POSIX
LFS_TGT=$(uname -m)-lfs-linux-gnu
PATH=/usr/bin
if [ ! -L /bin ]; then PATH=/bin:$PATH; fi
PATH=$LFS/tools/bin:$PATH
export LFS LC_ALL LFS_TGT PATH
EOF

$ source ~/.bash_profile

If you like to have a detailed explanation about these two files, you can checkout the following link below


Use the content below to create .profile file
cat > ~/.profile << "EOF"

export LFS=/mnt/lfs

EOF




No comments:

Post a Comment

How to change the root password in linux when it is forgotten/to change

This blog is all about changing the root password of the Linux system when it is forgotten or to reset the password...   Let's get it ...