I've installed Swift 3 language but i can only run it as root and i should type export path command first. It's not permanent.
- Code: Select all
root# export PATH="/opt/swift/swift-3.1.1-RELEASE-ubuntu16.10/usr/bin:$PATH"
root# swift
Welcome to Swift version 3.1.1 (swift-3.1.1-RELEASE). Type :help for assistance.
1>
if i exit from root and enter again i cant run swift only by typing swift in the terminal
- Code: Select all
root# swift
bash: swift: command not found
This is same when im trying to run it from user account(Not root)
How can i fix it and run it like python from anywhere (root or user account)?
Thanks in advance