ubuntu 遇到的一些问题和总结
来源:互联网 发布:网络答题系统 编辑:程序博客网 时间:2024/06/10 18:12
first is something about date command
date --helpyou could see a lot of things
usually , we use date
cal command is for the calender
bc command is for a calc .
cat -n filename :
you could find the line the cuorse is in.
the previlige of user group other all
one of the way is
chmod a + x filename : give x to all user
chmod u -x filename : expire x from user
if you want to change your super user's passwd ,
on the condition that dont know su passwd, you can simply edit the grub menu, find the ubuntu item , at the end line of "kernel", append "single" mode, and then , Ctrl +x or F10 go into the terminal
type "passwd", you can change the passwd of super userhttp://askubuntu.com/questions/129322/how-to-install-a-driver-for-an-nvidia-card-not-detected-by-additional-drivers
关于这个问题,个人感觉是ubuntu的问题,有的电脑有附加驱动,有的没有,版本号的问题吧。还是直接装kubuntu来的快一点....
change the promote of ternimal:
One of the first things I do after having a fresh Installation, is to change the command prompt to something I like. I know most of you linuxers would want to make the prompt look cooler than the usual "name-hostname: / $". But command prompt is not all about coolness, it serves a lot more useful purposes than it appears. In this howto, I will show you how to change your command prompt by editing PS1 environment variable and make it useful and cool at the same time .
In order to change the prompt you should know that the PS1 environment variable is responsible for it. Setting its value will change the command prompt. In order to know what the current value of this environment variable is, run the following command
[shredder12]$ echo $PS1
This will show you something like
[\u@\h \W]\$
and if its a debian or ubuntu system then the output will look like
\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}shredder12:\w\$
I know it looks scary but once understand the basics you can easily play around with this.
Editing the PS1 environment variable
Let us start with the first example.
[\u@\h \W]\$
Here '\u' means the username of the current user, \h stands for the hostname upto the first '.' and \W stands for the base name of the current working directlory with your $HOME(the user home directory) directory being specified as ~(tilda). '@' and '$' are ascii characters. We will learn more terminology soon, but for now lets stick to these three.
So, now if the username is "shredder12", hostname is "my.computer" and the current directory is /home/shredder12/Documents then the bash prompt will look something like.
[shredder12@my ~/Documents]$
As you can see its really simple, using similar attributes we can make more changes in our prompt. Say, you want to add time and date too in the prompt, we will use /t and /d attributes to do that. Now, the PS1 environment variable will look like
[\u@\t \d]$
and your prompt will be like this
[shredder12@11:47:19 Mon Jan 18]$
Saving the new PS1 variable in a bash script file
Now, you can easily change the PS1 variable to suit your needs but you will have to make the changes in the bash scripts to make them permanent.
If you are on a multiuser system then I would suggest you to add this line at the end of your $HOME/.bashrc file
export PS1="[\u@\t \W]$"
and then either run
source $HOME/.bashrc
or exit the terminal and open it again.
sudo lsb_release -a
查看發行版本
sudo cp -r
這樣可以把目錄同樣的複製到自己制定的場合
- ubuntu 遇到的一些问题和总结
- ubuntu下安装QT5遇到的一些问题和解决方法
- 装ubuntu遇到的一些问题 && solution
- ubuntu 入门遇到的一些问题
- 自己遇到的一些问题的总结
- 总结:遇到的一些小问题
- 安装linux遇到的一些问题总结
- 最近遇到的一些小问题总结
- boost::python 遇到的一些问题总结
- 总结学习遇到的一些问题
- 自己总结遇到的一些问题
- 最近遇到的一些问题总结
- 更新Xcode8遇到的一些问题总结
- Qt中遇到的一些问题总结
- ubuntu 使用中遇到的问题总结
- ubuntu初次使用遇到的问题总结
- 美版t430笔记本win8系统下装Ubuntu的一些尝试和遇到的问题
- 最近遇到的一些问题总结(UIScroll和Tips穿透问题)
- poj2368 Buttons
- Flex中常见的图
- BNU16490:Give Me the Number(模拟)
- 不要一个人吃饭
- Android的单线程模型
- ubuntu 遇到的一些问题和总结
- BNU16491:Hurdles of 110m(DP)
- 自己做的超简单win7网页版计算器 大家看看 不能传附件 缺个jQuery1.4.2只能自己下了 不好意思
- java- 发送邮件
- 多线程编程 - NSOperationQueue
- 環境変数
- 智能家居控制系统-功能概述
- 黑马程序员————————C#基础知识之结构体(二)
- 如何将vb中MSHflexgrid表中的数据导入到excel表中