Ubuntu终端闪退

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
gwgyk
帖子: 10
注册时间: 2014-08-03 11:56
系统: ubuntu

Ubuntu终端闪退

#1

帖子 gwgyk » 2014-11-07 20:31

今天不知道怎么回事,在用终端的时候无缘无故就闪退了。
执行像cd、ls这些命令还好,如果是java、hadoop这些命令,终端自动就退出了(关闭)。另外谷歌浏览器也打不开。想更新Ubuntu系统来解决,但是更新包下载完成安装的时候又退出了,不知道是怎么回事。
以前用的好好的,最近也没安装别的东西,这是怎么回事呢?该怎么恢复呢?请大神指教啊
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: Ubuntu终端闪退

#2

帖子 poloshiao » 2014-11-07 22:18

把下面指令 複製 貼進終端機 執行
sudo ls -al / | grep tmp
把結果直接複製 貼上來
gwgyk
帖子: 10
注册时间: 2014-08-03 11:56
系统: ubuntu

Re: Ubuntu终端闪退

#3

帖子 gwgyk » 2014-11-08 17:15

poloshiao 写了:把下面指令 複製 貼進終端機 執行
sudo ls -al / | grep tmp
把結果直接複製 貼上來
你好,下面是执行结果
附件
执行结果
执行结果
屏幕截图.png (8.13 KiB) 查看 15327 次
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: Ubuntu终端闪退

#4

帖子 poloshiao » 2014-11-08 18:16

1. 我的是
sudo ls -al / | grep tmp
drwxrwxrwt 7 root root 4096 11月 8 18:12 tmp
2. 試試
sudo chmod 1777 /temp
gwgyk
帖子: 10
注册时间: 2014-08-03 11:56
系统: ubuntu

Re: Ubuntu终端闪退

#5

帖子 gwgyk » 2014-11-08 19:41

poloshiao 写了:1. 我的是
sudo ls -al / | grep tmp
drwxrwxrwt 7 root root 4096 11月 8 18:12 tmp
2. 試試
sudo chmod 1777 /temp
你好,我执行了 “sudo chmod 1777 /tmp”命令后,终端恢复正常了,太感谢啦
不过想请教下,这是为什么呢?另外tmp最后一个字母“t”代表什么呢? 谢谢啦
附件
执行结果
执行结果
屏幕截图.png (8.73 KiB) 查看 15233 次
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: Ubuntu终端闪退

#6

帖子 poloshiao » 2014-11-08 20:10

tmp最后一个字母“t”代表什么呢
http://www.thegeekstuff.com/2011/02/sti ... tory-file/
If you set the sticky bit to a directory, other users cannot delete or rename the files (or subdirectories) within that directory.
設定 1777 其它使用者 不能刪除或重新命名
gwgyk
帖子: 10
注册时间: 2014-08-03 11:56
系统: ubuntu

Re: Ubuntu终端闪退

#7

帖子 gwgyk » 2014-11-09 12:34

poloshiao 写了:
tmp最后一个字母“t”代表什么呢
http://www.thegeekstuff.com/2011/02/sti ... tory-file/
If you set the sticky bit to a directory, other users cannot delete or rename the files (or subdirectories) within that directory.
設定 1777 其它使用者 不能刪除或重新命名
为什么以前删除tmp文件夹的时候都没问题呢?
另外,设定成1777之后,是不是tmp下的子目录也不能删除了呢?但好像不是这样啊?
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: Ubuntu终端闪退

#8

帖子 poloshiao » 2014-11-09 12:46

设定成1777之后,是不是tmp下的子目录也不能删除了呢?但好像不是这样啊?
1. 上面設定 1777 的指令 只針對 /tmp 不包含 子目錄或檔案
为什么以前删除tmp文件夹的时候都没问题呢?
2. 上面的 t 不能刪除 或 更改名稱 是針對第三者而言
hund123
帖子: 1
注册时间: 2015-07-07 1:43
系统: ubuntu

Re: Ubuntu终端闪退

#9

帖子 hund123 » 2015-07-07 1:45

:em02 :em02 :em02 :em02 成功解决感谢感谢
LLL-YUE
帖子: 1
注册时间: 2023-02-23 13:33

Re: Ubuntu终端闪退

#10

帖子 LLL-YUE » 2023-02-23 13:36

poloshiao 写了: 2014-11-08 18:16 1. 我的是
sudo ls -al / | grep tmp
drwxrwxrwt 7 root root 4096 11月 8 18:12 tmp
2. 試試
sudo chmod 1777 /temp
请问运行sudo chmod 1777 /temp这个命令后显示chmod: cannot access '/temp': No such file or directory该怎么办呢
头像
qy117121
论坛版主
帖子: 50528
注册时间: 2007-12-14 13:40
系统: Winbuntu
来自: 志虚国乌由市
联系:

Re: Ubuntu终端闪退

#11

帖子 qy117121 » 2023-02-23 14:48

LLL-YUE 写了: 2023-02-23 13:36
poloshiao 写了: 2014-11-08 18:16 1. 我的是
sudo ls -al / | grep tmp
drwxrwxrwt 7 root root 4096 11月 8 18:12 tmp
2. 試試
sudo chmod 1777 /temp
请问运行sudo chmod 1777 /temp这个命令后显示chmod: cannot access '/temp': No such file or directory该怎么办呢
/tmp 没有/temp这个目录
渠月 · QY   
本人只会灌水,不负责回答问题
无聊可以点一下→ http://u.nu/ubuntu

Ubuntu 20.04 快速设置指南,请配合浏浏览器自动翻译使用

邮箱 chuan@ubuntu.org.cn
回复