小编Roy*_*ley的帖子

通过更新 ~/.profile 添加自定义路径但不起作用

我通过添加以下内容更改了我的 ~/.profile 文件:

PATH="/user/share/android-sdk-linux/tools:$PATH"
Run Code Online (Sandbox Code Playgroud)

然后我注销并再次登录,但路径没有添加到 $PATH 环境变量中。我正在检查终端:

echo $PATH
/usr/share/android-sdk-linux/tools:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/jvm/jdk1.7.0_17/bin
Run Code Online (Sandbox Code Playgroud)

请指教

编辑

我什至尝试过:

PATH=$PATH:/usr/share/android-sdk-linux/tools
EXPORT PATH
Run Code Online (Sandbox Code Playgroud)

这里也没有运气。

编辑 2

~/.profile:

 # ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package. …
Run Code Online (Sandbox Code Playgroud)

user-profile environment-variables

16
推荐指数
2
解决办法
4万
查看次数

iptables 转发端口错误 - 没有该名称的链/目标/匹配

我正在尝试在我的 Ubuntu 12.04 LTS 服务器上配置 iptables 以将端口 443 转发到 8443。

但是当我运行这个命令时:

sudo iptables -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 8443
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

iptables: No chain/target/match by that name.
Run Code Online (Sandbox Code Playgroud)

我的 iptables 当前配置:

$ sudo iptables -L

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:https
DROP       tcp  --  anywhere             anywhere             tcp dpt:http

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination 
Run Code Online (Sandbox Code Playgroud)

我错过了什么或做错了什么?

iptables port-forwarding

12
推荐指数
1
解决办法
6万
查看次数

终端挂起“你想继续 [Y/n] 吗?y”

我正在 Ubuntu 12.10 上运行安装。在终端我输入:

gksudo apt-get install <package>
Run Code Online (Sandbox Code Playgroud)

然后我被提示:

After this operation, 4,789 kB of addition disk space will be used.
Do you want to continue [Y/n]?
Run Code Online (Sandbox Code Playgroud)

我回答:

Y
Run Code Online (Sandbox Code Playgroud)

终端然后似乎挂起。我已经等了 10 多分钟。

请指教

command-line 12.10

4
推荐指数
1
解决办法
1140
查看次数