New answers tagged

1

To reinitialize the terminal, a simple reset will fix this. For more info and options, man reset


-3

The mac commandline is based on linux and BSD, so while there are some mac specific things to take into account, you will get a long way by simply looking up tutorials for shell commands. For example, bash is a very common command line interpreter, so if you find a tutorial for that, I'm sure most of it should work on your mac.


0

As 'root' -> Edit /root/.bashrc Add to the end of the file: alias reboot='systemctl reboot' alias poweroff='systemctl poweroff' Save the file and start session as root again.


0

The accepted solution won't work in a headless set-up (no X11). A solution which works in any vim environment is to write your selection into a temporary file :w! /tmp/temp_file then pasting from that file in the other vim instance :r! cat /tmp/temp_file I have these two commands mapped as <leader>y and <leader>p in .vimrc: vmap <leader>y ...


0

Here using the WLS (Ubuntu for Windows) I had to edit at: /etc/inputrc Just run it and restart the terminal echo 'set bell-style none' >> /etc/inputrc


0

You can try this command in the folder path: wt -d . source


0

In order to solve this, I used Microsoft Visual Studio Code, created a new file called "brew.sh" with this content: /usr/local/bin/brew switch openssl 1.0.2s and then installed the "code runner" extension, and used it to run the file. I then uninstalled the "code runner" extension


0

to create a simple doskey doskey explorer=start . this will open the directory in explorer And I will try to make your idea doskey cd~=cd C:\Users\%username% It didn't work as you wanted because I coudn't put a space, but if you type cd~ it will do the same thing for more doskey macros visit my garbage repo


0

This solution is handy if your ssh keys are passphrase protected. The problem with all the answers above is that if your private key is passphrase protected, every time you launch a new terminal and try to use the private key, you have to type in the passphrase and you will end up running multiple copies of the ssh-agent in memory. The solution is to add ...


-1

I have stucked and tried several way. none have worked. I found a simple solutions. Go to the shared folder in Ubuntu. right click inside the empty space of the folder and select "open in terminal". That´s it.


0

To list the normal users on debian: getent passwd {1000..6000} 1000 is the minimum UID : grep ^UID_MIN /etc/login.defs 6000 is the maximum UID : grep ^UID_MAX /etc/login.defs see man login.def


0

It could be possibly permissions issue on the device or filesystem inconsistency. I would like to suggest to check permissions on : /dev/disk2s1. Also try to run fsck : Terminal : fsck -y /dev/disk2s1 GUI : Go to "Disk Utility". Head to "Applications" > "Utilities". Or tap "Command + Space" and type Disk Utility. Then highlight the drive and click on ...


1

I was able to pinpoint the issue further more. It happens only when I'm SSH-ing into a server and it happens only if I hit Ctrl+Z first to interrupt the program. If I use Ctrl+C first, it works; if I use Ctrl+Z and then Ctrl+C, it no longer works (the entire program is no longer getting any input). I guess I'll just leave it like that. Other findings ...


0

On MacOS X use login $ login login: your username password: your password Last login: Day Month Date HH:MM:SS on ttys000 $ whoami your username I was having issues running nano after using su - admin to edit a .bashrc file. When adjusting the window size the text would become garbled. The answer I found below explains why and led me in the correct ...


0

So you have list of users and remove users from current system who are not exist in that list? Get user list of current system getent passwd | cut -d: -f1 But you don't want to remove bunch of system generated users. aka 'Sytem Users'. Normal users, that made from useradd command or any system management tools has UID between 1000 - 60000. man login.defs. ...


1

This will print the first field of /etc/passwd, which contains all the accounts on a system. awk -F: '{print $1}' /etc/passwd To save that output to a file, use the > file redirection operator, e.g. awk -F: '{print $1}' /etc/passwd > users.txt


0

Here's one way you could call a renaming script from the root directory: [gnubeard@mothership: ~/root]$ tree . └── year └── MM-Month └── YYMMTT_Event ├── 01 Photos ├── 01 Screenshots ├── 02 Video ├── File.xy2z.jpg ├── File.xy2z.raw ├── File.xy3z.jpeg ├── File....


1

You can try this. #!/usr/bin/env bash shopt -s extglob nullglob while IFS= read -r -d '' file ; do if [[ $file == *Template.txt && -f $file ]]; then temp="${file%/*}" echo mv -v "$file" "${file%/*}/${temp##*/}.txt" elif [[ $file == *Photos* && -d $file ]]; then Photordir=$file elif [[ $file == *Screenshots* && -d $...


0

I've this error and resolved it adding this on my ~/.zshrc: export PATH=$HOME/bin:/usr/local/bin:$PATH See more here: https://github.com/ohmyzsh/ohmyzsh/issues/3507#issuecomment-431106509


0

If you're on windows you can simply use GitManager (GitAccountManager on npm): https://github.com/paul-hanneforth/GitManager. There you can do it all with only one command.


0

Since discovering FastScripts (which I highly recommend), I've been looking for a way to go all-in on it and rid myself of Automator. So I needed to have a way to pass the selected Finder items as parameters to the shell. For that, I created the helper script Input.scpt, which returns the selection as a list of POSIX paths: set text item delimiters to ...


1

What is your output for stty -a from terminal? You're looking for intr = ^C; This may be helpful: Ctrl-C and Ctrl-Z not working in terminal


0

Your terminal.out < pipe_in | tee result.txt syntax is correct; here's an example in action: [gnubeard@mothership: ~]$ mkfifo foo [gnubeard@mothership: ~]$ cat - < foo | tee bar In another shell-- echo "Hello, world!" > foo Then we see the output in the original terminal: [gnubeard@mothership: ~]$ cat - < foo | tee bar Hello, world! And the ...


0

Another solution would be to execute a bat file on the windows machine from ssh. It will remain running after you disconnect.


0

You probably want to download the packages on another PC - and make sure to check sure you have the packages you need. apt depends will tell you what you need geek@test-box:/var/crash$ apt depends filezilla filezilla Depends: filezilla-common (= 3.39.0-2) Depends: libc6 (>= 2.28) Depends: libdbus-1-3 (>= 1.9.14) Depends: libfilezilla0 (>= ...


0

Before exec'ing your shell, the system sets up the PATH environment variable from entries in the file /etc/paths and any files in the directory /etc/paths.d. Then, as you know, once it exec's your shell, depending on your shell and how it was invoked, your shell probably sources some shell startup scripts some of which may be system wide like /etc/profile, ...


1

Other plausible option, if you wanted to use the "new user" on only one project, you can do it by configuring it just for the project's directory in which you are working. e.g: git config --local user.name "Mike" git config --local user.email "mike@example.com" note that I'm using --local instead of --global.


0

The answer is you can't, since this is a bug in PuTTY. There is KiTTY which is fork of PuTTY and which has implemented proper Ctrl/Shift support, you may want to take a look on it. Source: https://superuser.com/a/1226621/360137 And just a side note - by default KiTTY has Ctrl+Up/Down as transparency control hotkey, so you may want to disable transparency ...


0

I also ran into this error but i realised the command has been changed from v8 to d8 Run this command instead d8


0

In Ubuntu 18.4 Ctrl+Alt+ L will do the trick.


0

While in any location in your terminal type the following sudo chmod 777 /path/to/your/folder/* Be sure to be sudo and the /* after folder means that you want to give permissions to any subfolder in the folder


0

Try: nano /bin/reboot add line: systemctl reboot exit and save chmod to your preffered execution level I'm sure there is a more elegant way to fix this but I am going to have a hard time remembering that only debian 10 requires a special reboot command. This works for me as long as i'm in su first.


0

Unfortunately, there is nothing you or tmux can do about this. tmux mostly tries to make sure the terminal is in a sensible state when it is idle, for example it sets the default colours and attributes. This is so if the connection drops or if you do something like ~. in ssh, you are not left typing in red or with the cursor in a strange position. But it ...


0

Open your bash_profile and add the following line: export PS1="\\[\033[33;1m\]\W\[\033[32m\]\$(parse_git_branch)\[\033[00m\]$ "


0

That's because <CTRL-=> is an invalid key combination in a terminal interface. (Hint: There's no such corresponding ASCII character.)


0

Thanks for your suggestion. I think this method will still be too time-consuming. The folder in question probably has around 7k files in it. What I really need is something that • Checks all names of files in folder • Identifies when several files have the same or similar name e.g. it will select super-hero.jpeg super-hero5.psd AND super-girl.png • It ...


0

If I had this problem I would first create a file with prefixes by doing ls -1 | sort > prefixes, edit the prefixes file and manually deleting the file names and replacing it with the proper prefixes. Then I would use that one to do a move like ecstasy proposed for all prefixes. So the prefixes file would first read Cat colours Cat finalised Cat sketch ...


0

You could just do it like this: mkdir Monster mv Monster* Monster/ (move everything that starts with "Monster" into Monster/)Then repeat the same commands with different files/folders


Top 50 recent answers are included