torsdag 2 april 2015

Linux - Debian - Jessie - Create Yout Own Commands In terminal not talking about alias

#---------------------------------------------------------------# Create Your Own Command in Linux forget old alias this rulez hynten@speed-mailer.com #---------------------------------------------------------------# root@wheezy:~# cd /root root@wheezy:~# nano .profile #add this line export PATH=$PATH":$HOME/bin" root@wheezy:~# nano .bash_aliases #add this line export PATH=$PATH":$HOME/bin" #to update root@wheezy:~# . .bash_aliases root@wheezy:~# . .profile root@wheezy:~# mkdir bin root@wheezy:~# ls bin root@wheezy:~# cd bin root@wheezy:~/bin# ls hello root@wheezy:~/bin# cat hello #! /bin/bash # place your bash script in the /root/bin/ # no .sh is needed.... # place #! /bin/bash on the first line echo "Hello! World" root@wheezy:~/bin# root@wheezy:~/bin# cd .. root@wheezy:~/bin# cd .. root@wheezy:/# hello bash: /root/bin/hello: Åtkomst nekas root@wheezy:/# chmod u=rwx,g=rx,o=r /root/bin/hello root@wheezy:/# hello Hello! World root@wheezy:/#
Skicka en kommentar