terminal

How to add categories in `free` command

How to add categories in `free` command I can extract the amount of memory used by running the following two commands from terminal: free -h | awk ‘/^Mem:/ {print $3}’ This shows the used memory, e.g. 4.8Gi. free -h | awk ‘/^Mem:/ {print $5}’ This shows the shared memory e.g. 906Mi. I would like a …

Total answers: 1

Relaunch a terminal using a terminal command

Relaunch a terminal using a terminal command Today, to convert from Markdown to PDF using Pandoc, it was necessary to install pdflatex. I did brew install basictex and then it was necessary to relaunch Terminal. For this, I simply closed it and opened it again. But is it possible to relaunch it using a command, …

Total answers: 1

Maintain position in terminal command history on macOS?

Maintain position in terminal command history on macOS? I enter many commands into the terminal. I enter command a, then b, then c, etc. I’m on command g now but I want to execute a, then b, then c, again. I press up (g), up (f), up (e), up (d), up (c), up (b), up …

Total answers: 1

Find if network supports IPv6

Find if network supports IPv6 Is there a way to find out if the IPv6 network cable is disconnected from the server through the terminal? Pinging google won’t work as it could be an intranet. Any help would be appreciated! Asked By: user2384330 || Source as said in serverfault, to show the localy listed ipv6 …

Total answers: 2

How to match a pattern instead of a single letter/number using brackets?

How to match a pattern instead of a single letter/number using brackets? I want exclude MSG, PDF and DOC from my path with shell parameter expension using brackets. When I place MSG between brackets only deletes the M instead of MSG. I looked around on the internet and read the documenation but still fail to …

Total answers: 3

How can I connect a bash process to a tty _without_ using getty

How can I connect a bash process to a tty _without_ using getty I would have two serial usb devices connected to each other, /dev/ttyUSB1 and /dev/ttyUSB2. I would like to run /bin/bash connected to one end, so that I can attach to the other end using picocom and use picocom as a local terminal …

Total answers: 2

How to replace both lower and uppercase extensions with Parameter Expansion?

How to replace both lower and uppercase extensions with Parameter Expansion? I’m converting doc files to txt using catdoc on Linux. To keep the same file name as output file I’m replacing the .doc extension with .txt using parameter expension. But there are many doc files ending on .DOC. How to make the .doc in …

Total answers: 2

Linux terminal with custom buttons to execute scripts or commands

Linux terminal with custom buttons to execute scripts or commands I’m aiming to improve my terminal usage for software development by creating a dashboard. First of all I want splits, vertical/horizontal, this is already possible with Tilix or Terminator (I don’t really like Tmux). But I’m missing a way to run scripts with my mouse. …

Total answers: 2

create folders from a text file

create folders from a text file ls -R $pwd > text.txt The above command generates the below txt file: engagement groups solo text.txt ./engagement: VAM01427.JPG _VJR3208.JPG _VJR3244.JPG _VJR3281.JPG ./groups: family friends ./groups/family: _VJR3358.JPG _VJR3376.JPG _VJR3379.JPG ./groups/friends: _VJR3404-2.jpg _VJR3416.jpg _VJR3456.JPG ./solo: VAM01381.JPG VAM01385.JPG VAM01386.JPG Based on this text file I am trying to create the folders …

Total answers: 2

Ctrl+left/right on micro via SSH+byobu

Ctrl+left/right on micro via SSH+byobu Locally when opening micro text editor, Ctrl + left/right works normally (jump 1 word). But when running via SSH + byobu, Ctrl + left/right gives [1;5C] and [1;5D]. Ctrl + S and Ctrl + Q also didn’t work, it suspends the terminal instead of saving and quit. What’s the cause …

Total answers: 1

Permission denied error when starting terminal

Permission denied error when starting terminal I’m getting this error when I start my terminal: /home/USERNAME/.config/envman/PATH.env:2: permission denied: /home/USERNAME/.local/bin this is my .zshrc file: # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. # Initialization code that may require console input (password prompts, [y/n] # confirmations, etc.) must go above this …

Total answers: 1

Alternatives to file polling?

Alternatives to file polling? In the following code, I have to poll $tmp_input to continue executing the code because wezterm cli send-text is asynchronous. This makes sure that $tmp_input is ready. tmp_input=$(mktemp ./tmp_input.XXXXXX) echo "read input; echo $input > $tmp_input" | wezterm cli send-text –pane-id $bottom_pane_id –no-paste while [ ! -s "$tmp_input" ]; do sleep …

Total answers: 3

Detect if the previous line was a command or not

Detect if the previous line was a command or not I’d like to enable Windows terminal shell integration in bash. (Don’t judge me.) One nice feature is that the terminal can show a mark in the scrollbar for each command, with a color depending on whether the command executed was successful or not. However, if …

Total answers: 1

How to delete rows that contain 0 in the "last column" in a linux terminal?

How to delete rows that contain 0 in the "last column" in a linux terminal? I’m wondering how can I delete rows when the value in the last column is "0" in multiple .tsv files where the last column number might not be the same for all files. And total number of columns varies hugely …

Total answers: 3

apt randomly switches languages ever since I installed Arabic on my Pop!_OS running KDE Plasma

apt randomly switches languages ever since I installed Arabic on my Pop!_OS running KDE Plasma I recently installed Arabic on my system and since then apt sometimes does things in Arabic and sometimes in English user@pop-os:~$ sudo apt update && sudo apt upgrade Hit:1 https://dl.winehq.org/wine-builds/ubuntu focal InRelease Hit:2 http://packages.microsoft.com/repos/code stable InRelease Hit:3 http://apt.pop-os.org/proprietary jammy InRelease …

Total answers: 1

Zsh – how to enable backspace terminal beep sound

Zsh – how to enable backspace terminal beep sound How can I enable the bell sound in my kali linux terminal (zsh) when I backspace or hit tab for suggestions, notice that the beep works when I’m in a sub shell (eg. I accessed mysql CLI the backspace works fine) Asked By: ALLAOUA Okba || …

Total answers: 1

installing an app through the terminal

installing an app through the terminal i’m brand new to Linux coming from Windows so everything is confusing for me at the moment. I run currently "Pop!_OS 22.04 LTS" and trying to install this VPN called Private VPN (https://privatevpn.com/support/getting-started/linux/linux/network-manager-tun-recommended). On the website it tells me to install use the terminal with using either: sudo apt-get …

Total answers: 1