Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

bash aliases

Featured Replies

  • Author

OK this is driving me crazy and im sure it will be something silly.

 

#!/bin/sh

cp /boot/scripts/.bashrc /root/

source /root/.bashrc

 

 

hardly rocket science right.... run it nada. run each line manually works fine. Tried #!/bin/sh, #!/bin/bash, #!/usr/bin/bash

 

someone put me out my mysery :)

OK this is driving me crazy and im sure it will be something silly.

 

#!/bin/sh

cp /boot/scripts/.bashrc /root/

source /root/.bashrc

 

 

hardly rocket science right.... run it nada. run each line manually works fine. Tried #!/bin/sh, #!/bin/bash, #!/usr/bin/bash

 

someone put me out my mysery :)

 

The source only runs for the duration of the #!/bin/sh process, it is not permanant.

Are you trying to have a .bashrc for every login process?

If so you can set the ENV variable in the .profile.

 

What is the goal here?

 

 

 

 

 

  • Author

The goal is two fold.

 

1. Understand why the simple script doesnt even copy.

2. Install my custom .bashrc

 

ta

  • 2 years later...

To install (assumes you have wget, if you dont then copy it up and move it manually)

 

cd ~

wget http://unraid.yi.org/addons/bashrc.txt

mv bashrc.txt .bashrc

. .bashrc

 

This file is no longer available... 401 Unauthorized

Page shows...

This site is running TeamViewer.

 

Free Port 80 for other applications in advanced settings.

 

Any chance we can get an updated link for this?

Is there another thread that I missed?

 

I still don't see anything like this implemented in 4.7 or in unMENU, but would be very useful.

 

  • 1 year later...
  • Author

What am I missing.

 

I wen to back to mess with .bashrc

 

Everything works as expected within a single session but next time I ssh in the .bashrc is not in use.

 

In simple terms i want to load a .bashrc for the root user via the go script and have it stick

What am I missing.

 

I wen to back to mess with .bashrc

 

Everything works as expected within a single session but next time I ssh in the .bashrc is not in use.

 

In simple terms i want to load a .bashrc for the root user via the go script and have it stick

Simple.

 

Create your .bashrc script.  Put a copy of it on your flash drive in the /boot directory

Then, in the "config/go" script add a line

 

cp /boot/.bashrc  /root/.bashrc

 

That should do it.

You might also need to set the permissions on the /root/.bashrc file.  If so, just add an additional line (after the "cp" command to the config/go script)

chmod 644 /root/.bashrc

 

Joe L.

  • Author

Still no joy:

 

cp /boot/config/.bashrc /root/.bashrc
chmod 644 /root/.bashrc

 

I am running this from the shell since i don't want to reboot to test but that shouldn't make a difference.?

 

However if i this once i am SSH'd in it works

 

source ~/.bashrc

 

But having to run that each time is a chore that should be avoidable

 

  • Author

Edited my post since the wording made it look like it was working... which it isnt

  • Author

Joe you are a star.!

 

Isnt it always the simple things that cause the most problems

 

Tom this is probably worth adding to unRAID proper along with a simple .bashrc user can edit

Joe you are a star.!

 

He's our Hero Member!

All this looks very interesting. I know a little about linux and the commands that come with it, a little more with command prompt, but I feel I've barely even scratched the surface with linux now!

 

I suppose I'll be reading as much as possible, as well as reading up on python. If only I could think of something simple I could actually use to get me to learn python! Back when I was on MIRC all the time I picked up that scripting language pretty well. Learning python just seems so very useful!

  • 4 years later...

I would rather use .bash_profile instead of .bashrc -> principe is similar but you no need to source it:

[*]make a copy of your existing .bash_profile to /boot/.bash_profile

[*]edit /boot/.bash_profile - add your desired aliases there

[*]add this line to /boot/config/go script: cp /boot/.bash_profile /root/.bash_profile

;)

 

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.