Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: Adam on July 31, 2013, 04:27:15 PM
-
Hi all, please advise as I can't find bashrc file in Tiny Core Linux.
root@box:/# find / -name bashrc
root@box:/# find / -name bash
root@box:/#
Reference:
http://www.cyberciti.biz/tips/bash-aliases-mac-centos-linux-unix.html
http://firewallengineer.wordpress.com/2013/08/02/problem-how-to-make-aliases-permanent-in-tiny-core-linux/
-
I'm using ~/.ashrc.
-
Did you load the bash extension?
-
I'm using ~/.ashrc.
I would appreciate if you could share how to use this?
I can't even find it in my TC
root@box:~# find / -name ashrc
root@box:~#
-
Did you load the bash extension?
Thanks for your advise. May I know how to load the bash extension?
-
http://forum.tinycorelinux.net/index.php/topic,7495.0.html
Please read documentation and spend time with wiki, particularly about basics like persistence, extensions and basic configuration, and also explore all included system tools to get more familiar with the environment.
-
Hi Adam
The files you seek are hidden. Try:
ls -la ~/.*rc
The filenames begin with a period which makes them hidden files.
-
Hi Adam
The files you seek are hidden. Try:
ls -la ~/.*rc
The filenames begin with a period which makes them hidden files.
Thanks again Rich, but there is No such file or directory
root@box:~# ls -la ~/.*rc
ls: /root/.*rc: No such file or directory
root@box:~#
Update:
Sorry I was looking at the wrong directory
root@box:~# find / -name .*ashrc
/home/tc/.ashrc
/etc/skel/.ashrc
root@box:~#
tc@box:~$ pwd
/home/tc
tc@box:~$ ls -la ~/.*rc
-rw-r--r-- 1 tc staff 476 Aug 12 08:53 /home/tc/.ashrc
tc@box:~$
-
Using "~/" as root is ambiguous.
I suggest using a file manager to get familiar with the system.
-
I’ve just found something new. By default, alias is working with tc id whiles doesn’t with root id. Please let me know how to load these alias setting in root as well.
tc@box:~$ alias
ls='ls -p'
cp='cp -i'
c='clear'
df='df -h'
reboot='sudo reboot'
rm='rm -i'
mv='mv -i'
la='ls -la'
du='du -h'
d='dmenu_run &'
ce='cd /etc/sysconfig/tcedir'
i='ifconfig | grep dd'
ll='ls -l'
tc@box:~$
tc@box:~$ sudo su
root@box:~# alias
root@box:~#
tc@box:~$ ls -la
total 12
drwxrws--- 3 tc staff 120 Aug 12 06:29 ./
drwxrwxr-x 3 root staff 60 Mar 4 2010 ../
-rw-rw-r-- 1 tc staff 2216 Aug 12 06:38 .ash_history
-rw-r--r-- 1 tc staff 517 Aug 12 05:46 .ashrc
drwxr-sr-x 3 tc staff 60 Aug 12 06:29 .local/
-rw-rw-r-- 1 tc staff 920 May 5 21:57 .profile
tc@box:~$
tc@box:~$ cat .ashrc
# ~/.ashrc: Executed by SHells.
#
. /etc/init.d/tc-functions
if [ -n "$DISPLAY" ]
then
`which editor >/dev/null` && EDITOR=editor || EDITOR=vi
else
EDITOR=vi
fi
export EDITOR
# Alias definitions.
#
alias df='df -h'
alias du='du -h'
alias ls='ls -p'
alias ll='ls -l'
alias la='ls -la'
alias i='ifconfig | grep dd'
alias c=clear
alias reboot='sudo reboot'
# Avoid errors... use -f to skip confirmation.
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -i'
alias d='dmenu_run &'
alias ce='cd /etc/sysconfig/tcedir'
tc@box:~$
root@box:~# cd ~
root@box:~# pwd
/root
root@box:~# ls -al
total 12
drwxrwxr-x 2 root staff 100 Aug 12 06:33 .
drwxrwxr-x 17 root staff 360 Dec 21 2012 ..
-rw-rw-r-- 1 root staff 248 Mar 4 2010 .Xdefaults
-rw------- 1 root root 83 Aug 12 06:35 .ash_history
-rw-rw-r-- 1 root staff 278 Aug 20 2012 .profile
root@box:~#
I’ve also found that there is no .ashrc file in root. Should I create one to fix this issue?
-
su -p
-
su -p
Superb 8)
tc@Core3:~$ sudo su
root@Core3:~# alias
root@Core3:~# su -p
root@Core3:~# alias
root@Core3:~# exit
root@Core3:~# exit
tc@Core3:~$ su -p
Password:
root@Core3:~# alias
ls='ls -p'
cp='cp -i'
td='sudo tcpdump -i 2 -n'
c='clear'
df='df -h'
tcpdump='sudo tcpdump'