Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 19/20 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 22nd May 2012, 04:16 PM
Programmer Offline
Registered User
 
Join Date: Apr 2012
Location: Kashan
Posts: 31
linuxchrome
Unhappy Problem with terminal and bash

In a very terrible happening some directories in /usr/lib deleted and so lot of my apps settings backed to default ( Google chrome , Firefox , Gtk windows settings and ... )
and when I opened my terminal I realized that it starts by an different thing that it always used to start
( I have the same problem with my Guake terminal emulator )

It always starts with this command :
Code:
[programmer@localhost programmer]$
but now it starts like this :
Code:
bash-4.2$
and when I use su command to become root It fixes again !! :
Code:
bash-4.2$ su
Password: 
[root@localhost programmer]#
What is the problem ? Pls help

Last edited by Programmer; 22nd May 2012 at 04:18 PM.
Reply With Quote
  #2  
Old 22nd May 2012, 04:35 PM
Gareth Jones Offline
Official Gnome 3 Sales Rep. (and Adminstrator)
 
Join Date: Jul 2011
Location: Leamington Spa, UK
Age: 31
Posts: 2,750
linuxfirefox
Re: Problem with terminal and bash

The shell prompt is controlled by the PS1 shell variable. The Fedora default is "[\u@\h \W]\$" (i.e. [user@hostname working_dir]$/#).

If you've deleted parts of /usr/lib, you'd be best off just reinstalling as fixing that manually will be tedious and error-prone, and probably take longer...
Reply With Quote
  #3  
Old 22nd May 2012, 04:42 PM
Programmer Offline
Registered User
 
Join Date: Apr 2012
Location: Kashan
Posts: 31
linuxchrome
Re: Problem with terminal and bash

Quote:
Originally Posted by Gareth Jones View Post
The shell prompt is controlled by the PS1 shell variable. The Fedora default is "[\u@\h \W]\$" (i.e. [user@hostname working_dir]$/#).

If you've deleted parts of /usr/lib, you'd be best off just reinstalling as fixing that manually will be tedious and error-prone, and probably take longer...
Do you mean re-installing fedora !!!! I can not do this because I have some apps on it that it will take a long time to install them ... no dude ... isn't there any way ? isn't any way to fix it ?
Reply With Quote
  #4  
Old 22nd May 2012, 04:46 PM
Gareth Jones Offline
Official Gnome 3 Sales Rep. (and Adminstrator)
 
Join Date: Jul 2011
Location: Leamington Spa, UK
Age: 31
Posts: 2,750
linuxfirefox
Re: Problem with terminal and bash

There is, but you'll have to figure out what packages provided the deleted files and "yum reinstall ..." them. You can use the "rpm --verify ..." command to verify installed packages, but I don't know the details off-hand I'm afraid (in a bit of a rush at the moment).
Reply With Quote
  #5  
Old 22nd May 2012, 04:58 PM
Programmer Offline
Registered User
 
Join Date: Apr 2012
Location: Kashan
Posts: 31
linuxchrome
Lightbulb Re: Problem with terminal and bash

Quote:
Originally Posted by Gareth Jones View Post
There is, but you'll have to figure out what packages provided the deleted files and "yum reinstall ..." them. You can use the "rpm --verify ..." command to verify installed packages, but I don't know the details off-hand I'm afraid (in a bit of a rush at the moment).
I have a Live DVD of Fedora , Isn't there any way to copy some system files that are important to my local Fedora ?
Reply With Quote
  #6  
Old 22nd May 2012, 05:12 PM
sea Offline
"Shells" (of a sub world)
 
Join Date: May 2011
Location: Confoederatio Helvetica (Swissh)
Age: 34
Posts: 3,278
linuxchrome
Re: Problem with terminal and bash

Ehm, just as info..
There are chances to that PS1 in several locations like:
/etc/bashrc
~/.bashrc
~/.bash_profile

Be sure to check them, before massiv reinstallation of anything.
Just a simple typo could have brought you to where you are now.
__________________
Laptop: Toshiba satellite p50-a-11 CPU: Intel i7 8*2400 MHz GPU: GeForce GT 745M RAM: 8192 MB Distro: Fedora (Rawhide) DE: Awesome
Text User Interface (TUI) // Windows 8+ & Fedora 20+ Dualboot
Reply With Quote
  #7  
Old 22nd May 2012, 05:38 PM
Programmer Offline
Registered User
 
Join Date: Apr 2012
Location: Kashan
Posts: 31
linuxchrome
Re: Problem with terminal and bash

Does this changes that has happened to my OS ( Or deletion of some files in /etc/lib ) cause bad effects ?
Do I have do any thing ? or they are not important and do not take me into terrible ?

If it's possible to reinstalling something then this terminal and bash problem will fix, Please tell me because It makes me feel bad!!

Last edited by Programmer; 22nd May 2012 at 05:45 PM.
Reply With Quote
  #8  
Old 22nd May 2012, 07:08 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,777
linuxfirefox
Re: Problem with terminal and bash

/etc holds system wide configuration data.

So yes, loss of files anywhere in that directory tree can cause bad things to happen.

IF yum works (note there is /etc/yum for configuration) then you can safely reinstall any package you want - use the "reinstall" option. This will replace all files of the corresponding package, and recreate any missing ones.
Reply With Quote
  #9  
Old 22nd May 2012, 07:38 PM
lightman47 Online
Registered User
 
Join Date: Apr 2009
Location: central NY, USA
Posts: 558
linuxchrome
Re: Problem with terminal and bash

are those "deleted" files in your Trash? (as they are system files, it's likely they may be in Roots' Trash, but you'd have to log in as root (su) to see them). If so, you _MAY_ be able to restore them. A lot depends on what you've done before/since you wrote your question.

"Does this changes that has happened to my OS ( Or deletion of some files in /etc/lib ) cause bad effects ?" I think you know that answer now. I had a friend who bought an Apple, then deleted all the stuff she didn't need. It froze on the very next boot-up - SHE didn't need those files, but the Operating System did! Incidentally, a LOT of us learn exactly this way. There are places you just don't even 'visit'. Hope you get your stuff back!

---------- Post added at 02:36 PM ---------- Previous post was at 02:18 PM ----------

Oh, duh! I don't recall seeing what Fedora version you are running, but if it's Fedora 16 - I have saved myself a system catastrophe by sticking in the Fedora 16 install disk and doing an Upgrade. THEN, before trying to do ANYTHING with the system or any app, running all the UPDATES (yum update).

Don't know what version changed this, but I know some previous version (and prior) wouldn't allow you to Upgrade a current system.

- Hey - it's worth a try. If you're not running 16, then PERHAPS and Upgrade could save you (or maybe make things worse???).

---------- Post added at 02:38 PM ---------- Previous post was at 02:36 PM ----------

Be careful - UPGRADE is the option (and it is several screens into the process).
Reply With Quote
  #10  
Old 22nd May 2012, 07:40 PM
Programmer Offline
Registered User
 
Join Date: Apr 2012
Location: Kashan
Posts: 31
linuxchrome
Re: Problem with terminal and bash

Thank you for your answers

The files that have deleted from my /etc/lib , I realized that they were depend on Node.js and so I reinstall Node.js and every thing fixed ...
But some directories and files in my /usr/lib have deleted and I am very afraid about them , I don't think the files in /usr/lib are very important ? ( Are they ) , and when I restart my laptop some of my apps settings have became to default settings and actually GNOME settings have became to default ( I set them again!! ) . Will these files cause bad things? I mean files which have deleted from /usr/lib ?

My problem about the terminal and bash that I described in the first post of thread still not fixed ... is there any way to fix it ? I am sure this problem is because of the files that have deleted from /usr/lib but I don't know are these changed important or not ?

Last edited by Programmer; 22nd May 2012 at 07:42 PM.
Reply With Quote
  #11  
Old 22nd May 2012, 07:51 PM
lightman47 Online
Registered User
 
Join Date: Apr 2009
Location: central NY, USA
Posts: 558
linuxfedorafirefox
Re: Problem with terminal and bash

/usr/lib files are VERY important. You can look in there, but "don't touch". Those are 'System files'.

As mentioned, check the "Trash".

--

If you get your stuff back, you ought research Linux directories/folders and their purposes before you do any more 'editing'. {Been there/done that!}.
Reply With Quote
  #12  
Old 22nd May 2012, 08:15 PM
Programmer Offline
Registered User
 
Join Date: Apr 2012
Location: Kashan
Posts: 31
linuxchrome
Unhappy Re: Problem with terminal and bash

Quote:
Originally Posted by lightman47 View Post
/usr/lib files are VERY important. You can look in there, but "don't touch". Those are 'System files'.

As mentioned, check the "Trash".

--

If you get your stuff back, you ought research Linux directories/folders and their purposes before you do any more 'editing'. {Been there/done that!}.

Please be serious and don't kidding with me ... My heart is not strong !

all files in my /usr/lib are not delete completely , some of them are deleted ...
Actually I don't know which ones , But I know some of us
I run this command for deleting all folders in a directory in /usr/lib
Code:
# cwd
/home/programmer
# rm -rf /usr/lib/my_exam_app
And then I got a chance that one of the files depend on google chrome didn't allow me to delete it and so the operation canceled and some others rescue !!!

What should I do ? Please don't say me I have to reinstall Fedora because I do not love that!
The only problem that has happened by this deletion is the problem that I said in the first post of the thread ...
Please help me to solve that problem ...
pls

Last edited by Programmer; 22nd May 2012 at 08:22 PM.
Reply With Quote
  #13  
Old 22nd May 2012, 08:31 PM
dd_wizard Offline
Registered User
 
Join Date: Sep 2009
Posts: 1,409
linuxfedorafirefox
Re: Problem with terminal and bash

If you are certain the command you ran was:
Code:
# rm -rf /usr/lib/my_exam_app
,
you couldn't have removed any system files. The only files you removed were conatined in the subfolder, my_exam_app.

As mentioned earlier, the locations mentioned by sea are the most likely places to have caused problems with the command line prompt.

dd_wizard

---------- Post added at 12:31 PM ---------- Previous post was at 12:27 PM ----------

If you accidently put a space immediately after "/usr/lib", all bets are off. I did something like that once when I tried to clean /tmp as root and put a space between / and the word tmp... That's the day I learned to really appreciated backups!

dd_wizard
Reply With Quote
  #14  
Old 22nd May 2012, 08:32 PM
lightman47 Online
Registered User
 
Join Date: Apr 2009
Location: central NY, USA
Posts: 558
linuxfedorafirefox
Re: Problem with terminal and bash

my response WAS serious! Leave the /usr folder and sub-folders alone! There are also MANY others you shouldn't be 'fiddling with'. For instance, /etc contains all the SETTINGS files for your system. You may CAREFULLY Edit some of them (after you do the research as to what files and what edits!!) There are a lot of other folders you don't want to "adjust"!

If you get this back, do some research on Linux file systems and what they are/do. To draw a 'parallel' - you deleted stuff from \Windows\System32 - and are now scrambling to get it back. We're trying to help you, but you may indeed have to re-install. I hope you don't with the advice of the others here.

Last edited by lightman47; 22nd May 2012 at 08:41 PM.
Reply With Quote
  #15  
Old 23rd May 2012, 06:40 AM
Programmer Offline
Registered User
 
Join Date: Apr 2012
Location: Kashan
Posts: 31
linuxchrome
Re: Problem with terminal and bash

Quote:
If you are certain the command you ran was:
Code:
# rm -rf /usr/lib/my_exam_app
,
you couldn't have removed any system files. The only files you removed were conatined in the subfolder, my_exam_app.
my bad on this , I did :
Code:
# rm -rf /usr/lib/my_exam_app *


Will this command influence the file and directories in /usr folder ? is it recursively go to /usr ?
( I want to know have some my files and folders in /usr folder been deleted or not ? )

------------------------------------------------------------------------------------
Quote:
my response WAS serious! Leave the /usr folder and sub-folders alone!
All of my files in /usr/lib have not deleted and I read something on a website that if system have restarted successfully after that deletion , It means that the important system files have not deleted but I will re-install fedora today

------------------------------------------------------------------------------------

Can anyone say me how to fix below problem ? it's very important for me
Quote:
In a very terrible happening some directories in /usr/lib deleted and so lot of my apps settings backed to default ( Google chrome , Firefox , Gtk windows settings and ... )
and when I opened my terminal I realized that it starts by an different thing that it always used to start
( I have the same problem with my Guake terminal emulator )

It always starts with this command :
Code:
[programmer@localhost programmer]$
but now it starts like this :

bash-4.2$

and when I use su command to become root It fixes again !! :

bash-4.2$ su
Password:
[root@localhost programmer]#

and again by opening new terminal or by running exit command it appears
What is the problem ? Pls help
Pls help me

Last edited by Programmer; 23rd May 2012 at 06:42 AM.
Reply With Quote
Reply

Tags
bash, problem, terminal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] change bash from terminal ask4nutz Programming & Packaging 3 18th August 2011 09:04 PM
[SOLVED] Terminal comes up as csh not bash rjames Using Fedora 3 20th April 2011 03:32 PM
Terminal bash comands unlovedwarrior Using Fedora 6 20th October 2006 08:43 PM
Terminal: bash Berticus Using Fedora 4 24th June 2005 04:45 AM
about terminal and bash Doritos Using Fedora 1 12th January 2005 10:02 PM


Current GMT-time: 14:53 (Friday, 25-07-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat