slow terminal prompt

Hi.
When I launch the terminal application it lasts more than 5 seconds until the prompt is available to start to write commands (hard disk loading something all that time). Could anone give some clue about where to start to look for?.
Thanks.

what type of hardware? spinning rust or ssd? my first thought is hardware failure.

I guess I leaved too few information about the issue assuming tumbleweed running on a PC.



System:
  Host: localhost.localdomain Kernel: 6.0.8-1-default arch: x86_64 bits: 64
    Desktop: Xfce v: 4.16.1 Distro: openSUSE Tumbleweed 20221124
CPU:
  Info: quad core Intel Core i5-3350P [MCP] speed (MHz): avg: 2074
    min/max: 1600/3300
Graphics:
  Device-1: NVIDIA GP108 [GeForce GT 1030] driver: nvidia v: 525.53
  Display: x11 server: X.org v: 1.21.1.4 driver: X: loaded: nvidia
    gpu: nvidia,nvidia-nvswitch resolution: 3840x2160~60Hz
  API: OpenGL v: 4.6.0 NVIDIA 525.53 renderer: NVIDIA GeForce GT
    1030/PCIe/SSE2
Drives:
  Local Storage: total: 5.46 TiB used: 3.54 TiB (64.9%)
Info:
  Processes: 239 Uptime: 10h 40m Memory: 15.57 GiB used: 3.14 GiB (20.2%)
  Shell: Bash inxi: 3.3.23



zif bash
 EXEC:sudo zypper if bash | grep [V,v]ersion
Version        : 5.2.9-491.12

when I launch xfce4-terminal or gnome-terminal I need to wait for long until I get the prompt. I can’t say since when or after what update it happens, but before this the prompt showed up almost instantly.

Try using hostnamectl to change from the highly generic localhost.localdomain to something unique about your environment. Or do it directly by editing /etc/hostname and rebooting. Most of my base hostnames are easy to remember what they belong to, 5 characters based upon computer or motherboard manufacturer & model #.

No Desktop Environment mentioned (there are at least four or five of them).

No name of “the terminal application” mentioned (there are more then one and thus “the” is out of place).

You expect a lot of mind reading capability from your potential helpers :frowning:

The information is in my answer to AdmFuba[b]r** in the third message.
**Not always is slow. Sometimes it appears almost instantly like before.The thing is it reads from HD like loading something and then the prompt is there and I can use the command line.
The terminal application seems not to be important as it happens when opening xfce4-terminal and gnome-terminal, and even when I boot in runlevel 3 multiuser not graphical. It seems something is loaded but I don’t know what. Then the hostname topic i think is not affecting.
Now I remember I installed anaconda and acepted the option to load during boot time but later I cancel it, or at least I think so.
Any hint would be welcome because I have no idea why this happened at some point.
Thanks.

Take a look at this
https://bbs.archlinux.org/viewtopic.php?id=219817
XFCE here is doing fine nothing unusual in the terminal.

Hi. It seems nothing changes at all. In order to fix this I would need to know what exactly happens in the background when I run the terminal application until the prompt inside it is shown. Guess it’s a difficult issue :wink:

It’s a very complicated issue. Run this command to get an idea:

set | less

Much of that is processed every time you do something that causes a shell prompt to appear that includes your PC’s hostname. What does /etc/hosts contain? What does /etc/hostname contain? What does /etc/resolv.conf contain? Which network configuration have you employed (NetworkManager, Wicked or SystemdNetwork)? Have you ever done anything to manipulate your network settings after your initial installation first completed? Are you normally on a LAN? Normally using wireless, or ethernet, or are both normally enabled concurrently?

Hi,

Probably start with

set -x

in your

~/.bashrc

It should show you which commands/functions/scripts is being executed/loaded.

On a side note

declare -p BASH_VERSION

or just

bash --version

should give you the version.

Finally the problem was the anaconda environment. Now the prompt shows up instantly again when I open a terminal. Thanks a lot for your advice.

Good to know! I remember that anaconda thing, sneaking in it’s own config/setup at the end of my

~/.bashrc

Sneaky anaconda! :laughing:

Yes. I think when you install it you can decide to load it with the system.
Actually in anaconda website you can see how to completely uninstall it and as a last step you can delete the environment variable exporting, but they say it’s in .bash_profile. Here in opensuse it’s in .bashrc. Anyway this is harmless. The problem ii if it loads at the beginning and it makes you wait 10 secs until you get the prompt.
When I reinstall it i won’t commit the same mistake. :smiling_face:

1 Like