Bash: command not found / not a valid object name:'master' - bash

I am really struggling with my shell.
All of the sudden it looks like this and any command prompts the following:
Any help?

Maybe first check if the commands are in your PATH?
And if they're not try this:
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
seems like a similar issue to this: https://unix.stackexchange.com/questions/167454/basic-commands-in-unix-not-working-i-e-bash-ls-no-such-file-or-directory

solved
I went to my bash_profil and deleted the git stuff.
Surely not the elegant solution but it works for now.
What exactly happened to my git, I ll see that later
thx guys

Related

OSX Terminal keeps on wiring over itself

So I found this issue happening and I don't quite know what to do about it.
I already tried this solution. I also found that I can easily recreate this issue when I connect to another machine.
One way I found was when I was doing the Google CTF 2018 beginner's quest. If I connect, quit, and connect again my terminal looks like this:
Pretty standard. However when I try to search the man page for the text "CTF" by typing /CTF my terminal overwrites old output and it looks like this:
Not quite sure how to fix this.
Here is my .bash_profile
# Bash Prompt
PS1=" \[\e[1;32m\]ᚸ \[\e[0m\]"
# GZip with maximum compression
# usage: zipg <file>.tar.gz <dir>
alias zipg='env GZIP=-9 tar cvzf'
Any way to solve this issue?

Source Bashrc has no effect

So I am extremely new to any kind of software development. Last week I installed Bash on Ubuntu on Windows to work on some coding for work. Unfortunately I did something wrong and had to reinstall everything.
I was almost done with reinstalling Bash on Ubuntu, when I accidentally closed the screen. Now I get exactly the same errors as previously, but I definately do not want to reinstall this again...
So what changed? Before my terminal was colored purple and green. Now, I only get white colors in the terminal. It looks something like this:
Image of terminal
Furthermore, after googling it said to apply
source ~/.bashrc
But then I get the error: "No such file or directory". Bash is installed because it does actually give
which bash -> /bin/bash
I also read that perhaps it could be my path, where $PATH gives me
bash: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program: No such file or directory
I was hoping that you'd have an idea what could be wrong, and best how to resolve it. I definately do not want to reinstall it AGAIN, because it took me too long already.
Hope you can help me!
Cheers,
Wessel
As stated by Jack, the configuration for bash should be in ~/.bashrc or similar.
What files are listed if you enter this command?
ls -a ~/
If you see .bashrc, you can edit it.
Here some ideas on colouring your prompt
https://www.howtogeek.com/307701/how-to-customize-and-colorize-your-bash-prompt/

-bash: pgrmname: command not found

I'm new in programming and I'm running into a problem. When I want to compile the program (cop) everything is ok but when I want to execute the program I have this: " :-bash:prgmname: command not found "
I don't understand why, it never happened before. I don't know if it'll help but I'm using Sublime Text. I tried to look at similar questions but I don't understand the answers... Sorry if my question sounds stupid but please answer if you have any idea why it does this and how to solve it.
By doing
cop
the command line interpreter will look for the standard bin directories, say /bin for the command. What you should do is
./cop
This searches the file in the current directory

unix commands not working

I wanted to start developing in ruby on rails, so I followed few tutorials how to set everything needed. However, I have problem now, because basic commands in terminal window dont work. For example if I type: whoami, ls, etc... error appears saying: -bash: whomami: command not found
when I type: $PATH, this appears: -bash: /Library/Ruby/Gems/2.0.0: is a directory
did I make a mistake while setting up rails environment or it's another problem? If you have similar experiences, please help me to solve this.
Thanks
Try the following command.
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
Better you use this command in you .bashrc file.

ipython cd magic does not seem to be working properly in Windows

I'm noticing some strangeness with how paths work in IPython. I'm using version 1.2.1 but I've seen the problem in 1.1 as well. The first thing I notice is that the %pwd and the %cd magics give different results. If I use os.getcwd(), I see that the %cd macro seems to be right. Can anyone explain why this is occurring?
%pwd
Out[1]: u'C:\\Users\\bubnabm1\\Documents\\Python Scripts'
%cd
C:\emacs
import os
os.getcwd()
Out[4]: 'C:\\emacs'
The second (probably related) issue I'm noticing is that when I use the %cd magic to change my path it prints the new path to stdout, and os.getcwd() shows the path has changed, but if I call %cd again it prints the old path as if nothing has changed. Is there something I'm missing here? Continuing from my previous example, the code sample below shows this behavior:
%cd ..
C:
os.getcwd()
Out[6]: 'C:\\'
%cd
C:\emacs
I've looked at StackOverflow, Google, and the IPython issue tracker and haven't found anything that could explain this behavior. However I'm a new IPython user and I'm open to the possibility that I'm misunderstanding something or doing something incorrect, so I wanted to post here before I raise the issue to the IPython team. Any help would be greatly appreciated.
IPython's %cd magic, like its other shell-like magic commands (pwd, ls), is modeled on Linux, not on Windows.
In Windows, a cd command without arguments acts like the Linux pwd - it prints the working directory. You were apparently expecting this behavior from IPython's %cd magic. But in Linux/OSX/*nix, a cd command without arguments changes the working directory to your home directory.

Resources