Bashrc command

Hi all, bashrc does not source at all on start. I put my shortcuts commands in bashrc but I am unable to use them until I source the bashrc, in which case my terminal becomes weird.

 ╭─bruttherjoe@bruttherjoe in ~/Downloads took 20s
✦  ╰─λ source ~/.bashrc
[\u@\h \W]$

so [\u@\h \W]$ becomes my user? I need bashrc to be sourced upon opening a new terminal. I am not sure how to resolve this, please help me

EDIT : inxi - Faz

System:    Kernel: 5.12.3-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 10.2.0
           parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
           root=UUID=224e5210-da67-4bea-b4da-c093bd85c8e8 rw rootflags=subvol=@ quiet
           splash rd.udev.log_priority=3 vt.global_cursor_default=0
           systemd.unified_cgroup_hierarchy=1 loglevel=3
           Desktop: i3 4.19.1 info: i3bar vt: 7 dm: LightDM 1.30.0 Distro: Garuda Linux
           base: Arch Linux
Machine:   Type: Laptop System: Aftershock product: NH50_70RH v: N/A serial: <filter>
           Chassis: type: 10 serial: <filter>
           Mobo: Aftershock model: NH50_70RH serial: <filter> UEFI: INSYDE v: 1.07.01TASP
           date: 03/19/2019
CPU:       Info: 6-Core model: Intel Core i7-9750H bits: 64 type: MT MCP arch: Kaby Lake
           note: check family: 6 model-id: 9E (158) stepping: A (10) microcode: DE cache:
           L2: 12 MiB
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 62399
           Speed: 3736 MHz min/max: 800/4500 MHz Core speeds (MHz): 1: 3736 2: 4292 3: 4296
           4: 4147 5: 4283 6: 4294 7: 4283 8: 4026 9: 4121 10: 4297 11: 4170 12: 4188
           Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled
           Type: l1tf
           mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable
           Type: mds mitigation: Clear CPU buffers; SMT vulnerable
           Type: meltdown mitigation: PTI
           Type: spec_store_bypass
           mitigation: Speculative Store Bypass disabled via prctl and seccomp
           Type: spectre_v1
           mitigation: usercopy/swapgs barriers and __user pointer sanitization
           Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, IBRS_FW,
           STIBP: conditional, RSB filling
           Type: srbds mitigation: Microcode
           Type: tsx_async_abort status: Not affected
Graphics:  Device-1: Intel CoffeeLake-H GT2 [UHD Graphics 630] vendor: CLEVO/KAPOK
           driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:3e9b class-ID: 0300
           Device-2: NVIDIA GP107M [GeForce GTX 1050 3 GB Max-Q] vendor: CLEVO/KAPOK
           driver: nvidia v: 465.27 alternate: nouveau,nvidia_drm bus-ID: 01:00.0
           chip-ID: 10de:1c91 class-ID: 0300
           Device-3: Chicony Chicony USB2.0 Camera type: USB driver: uvcvideo bus-ID: 1-8:5
           chip-ID: 04f2:b685 class-ID: 0e02
           Display: x11 server: X.Org 1.20.11 compositor: picom v: git-dac85 driver:
           loaded: intel,nvidia unloaded: modesetting,nouveau alternate: fbdev,nv,vesa
           display-ID: :0 screens: 1
           Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2")
           s-diag: 582mm (22.9")
           Monitor-1: eDP1 res: 1920x1080 hz: 60 dpi: 143 size: 340x190mm (13.4x7.5")
           diag: 389mm (15.3")
           Monitor-2: HDMI1 res: 1920x1080 hz: 120 dpi: 70 size: 700x390mm (27.6x15.4")
           diag: 801mm (31.5")
           OpenGL: renderer: Mesa Intel UHD Graphics 630 (CFL GT2) v: 4.6 Mesa 21.2.1
           direct render: Yes
Audio:     Device-1: Intel Cannon Lake PCH cAVS vendor: CLEVO/KAPOK driver: snd_hda_intel
           v: kernel alternate: snd_soc_skl,snd_sof_pci_intel_cnl bus-ID: 00:1f.3
           chip-ID: 8086:a348 class-ID: 0403
           Sound Server-1: ALSA v: k5.12.3-zen1-1-zen running: yes
           Sound Server-2: JACK v: 1.9.19 running: no
           Sound Server-3: PulseAudio v: 15.0 running: yes
           Sound Server-4: PipeWire v: 0.3.34 running: yes
Network:   Device-1: Intel Cannon Lake PCH CNVi WiFi driver: iwlwifi v: kernel port: 5000
           bus-ID: 00:14.3 chip-ID: 8086:a370 class-ID: 0280
           IF: wlp0s20f3 state: up mac: <filter>
           Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
           vendor: CLEVO/KAPOK driver: r8169 v: kernel port: 3000 bus-ID: 08:00.1
           chip-ID: 10ec:8168 class-ID: 0200
           IF: enp8s0f1 state: down mac: <filter>
           Device-3: Ralink MT7601U Wireless Adapter type: USB driver: mt7601u
           bus-ID: 1-1:2 chip-ID: 148f:7601 class-ID: 0000 serial: <filter>
           IF: wlp0s20f0u1 state: down mac: <filter>
Bluetooth: Device-1: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: USB driver: btusb
           v: 0.8 bus-ID: 1-14:6 chip-ID: 8087:0aaa class-ID: e001
           Report: bt-adapter ID: hci0 rfk-id: 1 state: down bt-service: enabled,running
           rfk-block: hardware: no software: no address: <filter>
Drives:    Local Storage: total: 476.94 GiB used: 407.2 GiB (85.4%)
           SMART Message: Required tool smartctl not installed. Check --recommends
           ID-1: /dev/nvme0n1 maj-min: 259:0 model: ASE8TNVME512 size: 476.94 GiB
           block-size: physical: 512 B logical: 512 B speed: 15.8 Gb/s lanes: 2 type: SSD
           serial: <filter> rev: E8TM14.2 temp: 37.9 C scheme: GPT
Partition: ID-1: / raw-size: 68.36 GiB size: 68.36 GiB (100.00%) used: 15.09 GiB (22.1%)
           fs: btrfs dev: /dev/nvme0n1p5 maj-min: 259:5
           ID-2: /boot/efi raw-size: 99 MiB size: 95 MiB (95.96%) used: 30.3 MiB (31.9%)
           fs: vfat dev: /dev/nvme0n1p2 maj-min: 259:2
           ID-3: /home raw-size: 68.36 GiB size: 68.36 GiB (100.00%)
           used: 15.09 GiB (22.1%) fs: btrfs dev: /dev/nvme0n1p5 maj-min: 259:5
           ID-4: /var/log raw-size: 68.36 GiB size: 68.36 GiB (100.00%)
           used: 15.09 GiB (22.1%) fs: btrfs dev: /dev/nvme0n1p5 maj-min: 259:5
           ID-5: /var/tmp raw-size: 68.36 GiB size: 68.36 GiB (100.00%)
           used: 15.09 GiB (22.1%) fs: btrfs dev: /dev/nvme0n1p5 maj-min: 259:5
Swap:      Kernel: swappiness: 133 (default 60) cache-pressure: 75 (default 100)
           ID-1: swap-1 type: zram size: 638.3 MiB used: 11.4 MiB (1.8%) priority: 32767
           dev: /dev/zram0
           ID-2: swap-2 type: zram size: 638.3 MiB used: 14.8 MiB (2.3%) priority: 32767
           dev: /dev/zram1
           ID-3: swap-3 type: zram size: 638.3 MiB used: 10.1 MiB (1.6%) priority: 32767
           dev: /dev/zram2
           ID-4: swap-4 type: zram size: 638.3 MiB used: 12.2 MiB (1.9%) priority: 32767
           dev: /dev/zram3
           ID-5: swap-5 type: zram size: 638.3 MiB used: 9.6 MiB (1.5%) priority: 32767
           dev: /dev/zram4
           ID-6: swap-6 type: zram size: 638.3 MiB used: 11.2 MiB (1.8%) priority: 32767
           dev: /dev/zram5
           ID-7: swap-7 type: zram size: 638.3 MiB used: 11.4 MiB (1.8%) priority: 32767
           dev: /dev/zram6
           ID-8: swap-8 type: zram size: 638.3 MiB used: 11.2 MiB (1.8%) priority: 32767
           dev: /dev/zram7
           ID-9: swap-9 type: zram size: 638.3 MiB used: 9.7 MiB (1.5%) priority: 32767
           dev: /dev/zram8
           ID-10: swap-10 type: zram size: 638.3 MiB used: 9 MiB (1.4%) priority: 32767
           dev: /dev/zram9
           ID-11: swap-11 type: zram size: 638.3 MiB used: 9.4 MiB (1.5%) priority: 32767
           dev: /dev/zram10
           ID-12: swap-12 type: zram size: 638.3 MiB used: 11.4 MiB (1.8%) priority: 32767
           dev: /dev/zram11
Sensors:   System Temperatures: cpu: 70.0 C mobo: N/A
           Fan Speeds (RPM): N/A
Info:      Processes: 350 Uptime: 1h 48m wakeups: 1 Memory: 7.48 GiB used: 3.14 GiB (41.9%)
           Init: systemd v: 249 tool: systemctl Compilers: gcc: 11.1.0 clang: 12.0.1
           Packages: 1204 pacman: 1197 lib: 305 flatpak: 7 Shell: Zsh v: 5.8
           running-in: alacritty inxi: 3.3.06

P.S. How do i Reply? i could reply for some threads but not for this one, I can only edit my original post?

No inxi -Faz
No help.

You can do two things

  1. Use shortcut commands in fishrc instead of bashrc

  2. Use bash

chsh -s /bin/bash
2 Likes

It is because you are probably using fish, not bash. In the settings for your terminal, change the shell to /bin/bash. Otherwise, use chsh as @Naman suggested

You can’t reply because your post was moved due to the fact that you didn’t provide an inxi. Once it is moved back to a normal category, you will be able to reply again.

3 Likes

Actually bash is the default login shell
But in terminal we set it to use fish.

As fish is user friendly while we still keep compatibility with apps that need bash as login shell

1 Like

Thank you all! I am now reading about fish. Seems like I wont change after all, after I learn how to set shortcuts like in bashrc.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.