macbook, mein .profile durcheinander gebracht und jetzt funktionieren keine Befehle wie nano, rm usw.

1132
user27449

Ich habe versaut .profileund jetzt kann ich nicht mal nanozur Arbeit.

Ich habe immer versucht, meiner Umgebungsvariable git hinzuzufügen, wenn ich das Terminal starte, und ich habe den Befehl offensichtlich durcheinander gebracht und nichts funktioniert.

Nicht einmal der lsBefehl funktioniert.

Wo nanokann ich die Datei bearbeiten?

Wie soll ein Standard .profileaussehen?

2
Nächstes Mal sollten Sie sensible Dateien sichern, bevor Sie sie bearbeiten;) Ich habe keine vollständige Antwort, die Sie in den Antwortbereich werfen können. Ich würde jedoch empfehlen, ein neues Benutzerkonto zu erstellen und das .profile dieses Benutzers als "Standard" zu verwenden. .profile, um zu sehen, was Sie in Ihren Änderungen möglicherweise falsch gemacht haben, oder stellen Sie mindestens das wieder her, was Sie zuvor hatten. Emory Bell vor 13 Jahren 0

3 Antworten auf die Frage

2
James T

You should still be able to use the full path to run commands. For example:

/bin/ls /bin/nano 

I'm not sure where ls is on a mac... it might be under /usr/bin/ls

I'm using Ubuntu 10.04. My .profile file in my home directory looks like this:

# ~/.profile: executed by the command interpreter for login shells. # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login # exists. # see /usr/share/doc/bash/examples/startup-files for examples. # the files are located in the bash-doc package. # the default umask is set in /etc/profile; for setting the umask # for ssh logins, install and configure the libpam-umask package. #umask 022 # if running bash if [ -n "$BASH_VERSION" ]; then # include .bashrc if it exists if [ -f "$HOME/.bashrc" ]; then . "$HOME/.bashrc" fi fi # set PATH so it includes user's private bin if it exists if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" fi 

Worth a shot i guess.

Ich bin froh, dass es geklappt hat (-: James T vor 13 Jahren 0
0
Josh K

Where is this .profile you messed up? I have a .bash_profile, but no .profile file.

Ich habe folgende Anweisungen erstellt, aber ich habe ein ';' Anstelle eines ':' in der Zeile in der Nähe des '$ PATH'-Teils. http://grasshopperpebbles.com/mac/installing-git-on-mac-os-x/ user27449 vor 13 Jahren 0
Es befindet sich in meinem 'Home'-Ordner, dh: cd ~ user27449 vor 13 Jahren 0
0
Darth Android

Does the GUI still function (Finder, Desktop, Dock, etc.)? If so, Open the .profile file in TextEdit and replace the ; with a : (you might have to turn on hidden files or type the name manually into the open file dialog)

If your GUI is no longer functioning, reboot the computer and hold Command+S as it reboots. This should dump you at a command line with root access. Use nano to fix your .profile file.