LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-18-2013, 09:59 AM   #1
grahamb314
LQ Newbie
 
Registered: Apr 2011
Posts: 16

Rep: Reputation: Disabled
What is -bash-4.1$ ?


When I login I see this:

-bash-4.1$

usually is is username@server$

I was moving my home directory and deleted it but I remade it with mkdir however there were probably some hidden files I deleted inside the folder?

How can I solve this and related issues I may see?
 
Old 06-18-2013, 10:05 AM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Correct. You lost your .bash_profile and .bashrc files.

If you'd like to mess around with re-creating it, there are plenty of references out there.

Here are some bash prompts: http://www.maketecheasier.com/8-usef...pts/2009/09/04

Last edited by szboardstretcher; 06-18-2013 at 10:22 AM.
 
1 members found this post helpful.
Old 06-18-2013, 10:22 AM   #3
grahamb314
LQ Newbie
 
Registered: Apr 2011
Posts: 16

Original Poster
Rep: Reputation: Disabled
Any idea how I would re-create them?
 
Old 06-18-2013, 10:29 AM   #4
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
what have you tried? or what guides have you tried?
 
Old 06-18-2013, 10:30 AM   #5
grim76
Member
 
Registered: Jun 2007
Distribution: Debian, SLES, Ubuntu
Posts: 308

Rep: Reputation: 50
Take a look at /etc/skel usually the files you need are held in this file location.

Code:
/etc/skel $ ls -alh
total 20K
drwxr-xr-x  2 root root 4.0K Mar 13 12:09 .
drwxr-xr-x 99 root root 4.0K Jun 11 20:46 ..
-rw-r--r--  1 root root  220 Jan 11 00:34 .bash_logout
-rw-r--r--  1 root root 3.2K Feb  8 20:24 .bashrc
-rw-r--r--  1 root root  675 Jan 11 00:34 .profile
Make sure that you copy these files and do not move them.

Last edited by grim76; 06-18-2013 at 10:36 AM. Reason: Completion
 
1 members found this post helpful.
Old 06-18-2013, 02:42 PM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
If this is the ancient RHEL 4.1
then it will not support any of the new CPU's
rhel4 is eight (8) years old .
 
Old 06-18-2013, 03:35 PM   #7
Madhu Desai
Member
 
Registered: Mar 2013
Distribution: Rocky, Fedora, Ubuntu
Posts: 541

Rep: Reputation: 153Reputation: 153
Quote:
Originally Posted by grahamb314 View Post
When I login I see this:

-bash-4.1$

usually is is username@server$

I was moving my home directory and deleted it but I remade it with mkdir however there were probably some hidden files I deleted inside the folder?

How can I solve this and related issues I may see?
Create a folder in /home directory for user. here i take an example of user Harry

As superuser do:

1.Create a folder for user harry
Code:
# mkdir -p /home/Harry
2.create .bashrc_profile and .bashrc files in /home/Harry
Code:
# cat .bash_profile
if [ -f ~/.bashrc ]; then
	. ~/.bashrc
fi
PATH=$PATH:$HOME/bin
export PATH
Code:
# cat .bashrc
if [ -f /etc/bashrc ]; then
	. /etc/bashrc
fi
3. Set owner and group of directory
Code:
# chown -R harry:harry /home/Harry
4.Assign newly created directory to Harry
Code:
# usermod -m -d /home/Harry harry
You are done.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Converting Script from Linux (GNU) Bash 4 to Solaris Bash 2.05 - Any cheat sheet? oly_r Solaris / OpenSolaris 6 05-03-2013 08:25 AM
Bash problem : -bash: [: /bin/bash: unary operator expected J.A.X Linux - Software 1 09-22-2011 05:52 AM
[SOLVED] Using a long Bash command including single quotes and pipes in a Bash script antcore Linux - General 9 07-22-2009 11:10 AM
BASH -copy stdin to stdout (replace cat) (bash browser) gnashley Programming 4 07-21-2008 01:14 PM
why did bash 2.05b install delete /bin/bash & "/bin/sh -> bash"? johnpipe Linux - Software 2 06-06-2004 06:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration