Terminal prompt issue - terminal

When I open terminal on my Mac, the first line that comes up is:
(base) myname#honor_view10-
followed by a string of numbers and letters.
When I open a terminal in VScode, it is instead:
(base) myname#ds-iphone Downloads
What is the reason for this? Could it be a malware issue?
I have tried using scp to copy from my device to a remote server but get a 'No such file or directory error' which I believe may be related

Related

open vscode editor from ssh'd command line

I am working on a remote machine from my command line using ssh. I want to be able to open files in VScode from this ssh'd terminal using the regular "code file.txt" used when opening VScode in my local machine, or when using the VScode integrated terminal.
I have found several answers but none of them work (Is it possible to use the "code" command in SSH'ed terminal to open VS Code on local machine with SSH extension?). After trying several solutions from this answers I still get
-bash: code: command not found or
-bash: /bin/code: No such file or directory
My local machine is a Mac with Zsh, and the remote is linux using bash.
Thanks for any help :)

What is ._.bash_profile file

When I was figuring out how my terminal (Cygwin 64bit on Windows 10 laptop) works, I found a ._.bash_profile file (emphasis on the extra ._). That was after I tried the command ls -a on the home directory.
Terminal displaying all of the files and folders in my home directory.
When I typed nano ._.bash_profile into the terminal, I got what I think is just garbled text:
Click here for the text of the ._.bash_profile
So my question is what on earth is ._.bash_profile?
Can you open the file with an IDE like Visual Studio Code?
It looks like a file with some sort of Mac Os file

Terminal not recognizing vim as a command, batch file etc

So I was watching a tutorial on laravel and the tutor in the vid enters the command on the terminal as shown in the picture. He said we can use touch command on mac but to keep compatible on windows he's using vim. I don't believe he has vim.exe on his laravel project folder. Project name is freecodeGram as in pic. How do i get my computer to understand the vim command. Thanks in advance, I'm on windows.
Command was: vim database/database.sqlite
You need to add the path to vim.exe to your system PATH. This would allow you to type vim ..... in the CLI and would execute vim directly. Otherwise, prefix vim database/database.sqlite with c:/path/to/vim database/database.sqlite

ANTLR 4 installation failed on OS X?

I've got a question about installing ANTLR on my Unix system (MacOS Sierra).
I followed the Quick Start steps (ANTLR 4 Quick Start installation steps for OS X) as described on the homepage of ANTLR 4. Everything seems to be working fine but whenever i close my Terminal the export and alias commands seem to have disappeared. Does anyone have an idea what i might be doing wrong? Thank you!
p.s. I'm new to OS X and using the terminal.
Append the export and 2 alias commands to the .bash_profile file in your home directory.
Every time you open a terminal, the contents of that file is loaded.
So the steps i took was as followed;
Open terminal
enter cd /usr/local/lib
enter sudo curl -O http://www.antlr.org/download/antlr-4.5.3-complete.jar
enter touch ~/.bash_profile; open ~/.bash_profile
Text editor opens up.
Paste the following;
export CLASSPATH=".:/usr/local/lib/antlr-4.5.3-complete.jar:$CLASSPATH"
alias antlr4='java -jar /usr/local/lib/antlr-4.5.3-complete.jar'
alias grun='java org.antlr.v4.gui.TestRig'
Save the file
reopen the terminal. Test if antlr4 and grun works.

Terminal app in Mac OS X Lion 10.7 stuck?

Some days ago I tried to create a shell script which would open all the torrents files in my downloads folder. I am not sure if I get the sh file written right, since then I am getting this message:
Last login: Fri May 18 22:54:28 on ttys000
LSOpenURLsWithRole() failed for the application /Users/Alex/Downloads/(Demonoid.me)-Adobe_Master_Collection_CS5_(OS_X)__12302562.8934.torrent
with error -10810 for the files
/Users/Alex/Downloads/Coda_1_6_2_[_Plist]_[Serial]_O-Demonoid.me-O_12302562.8934.torrent,
/Users/Alex/Downloads/Coda_1_7_3_[k'd]-((Demonoid.me))_12302562.8934.torrent,
/Users/Alex/Downloads/[kat.ph]grid.systems.in.graphic.design.josef.muller.brockmann.torrent,
and /Users/Alex/Downloads/[kat.ph]pixie.lott.cry.me.out.mp3.housezz.torrent.
job done
/bin/bash: line 8: end: command not found
[Process completed]
And I can't do anything in Terminal. I don't know what to do. Any insights about it?
Open a terminal and let it hang.
Open the terminal preferences menu (Command-comma).
In the Startup tab, remember your current shell setting.
Choose a shell other than Bash or Sh (e.g. /bin/tcsh — this is a desparation measure, and only temporary).
Close the locked terminal.
Open a new terrminal (Command-N).
That should give you a command prompt.
In that window, edit your .profile or .bashrc or whatever you added the Torrent lines to.
Remove the Torrent-related lines.
Go back to terminal preferences.
Reset the shell to /bin/bash.
Try opening a terminal window once more.
When it comes to trying to add the Torrents again, write a shell script. Debug it. Only put it in your profile when you're sure it is correct, stable, reliable, and doesn't lock your terminal. Then test it with a terminal already open — opening a new terminal to do the test. You've then still got an unlocked terminal you can fix problems with.
If you have a graphical Vim (Gvim or MacVim), you may be able to launch that and then edit your .profile without having to tweak the Terminal preferences.

Resources