Linux系统Ubuntu 14.04版本下常用命令小集锦

此篇博客为小辣鸡Sukie在学习使用Linux系统Ubuntu14.04版本的过程中,对于一些基本操作的命令的小总结与笔记...可以帮助linux系统的命令行快速入门啦~希望和大家多多交流与学习啦~后期还会慢慢更新滴~♪(^∇^*)


1.常用快捷键及系统命令

(1)快捷键:

Ctrl+alt+t 调出终端

Ctrl + h 查看隐藏文件(前面带.的文件)

Ctrl+Shift+X 选区截图快捷键(具体还是看自己的系统设置啦~\(≧▽≦)/~啦啦啦)

(2)系统命令:

unity-control-center 打开系统设置

2.文件目录相关操作命令

cd /home/lab/Desktop/FlaskWeb 去任意目录(桌面上的FlaskWeb文件夹(前面必须有斜线,最后面的斜线可有可无))

cd /home/lab/Desktop/FlaskWeb+tab键3次 显示当前目录下文件夹(默认目录下可用)
/home/lab/Desktop/FlaskWeb+tab键3次 显示当前目录下文件夹(默认目录下可用)

cd flasky 去当前目录下的文件夹(在非默认目录下,无斜线)

cd ..返回上级目录

cd 返回默认路径

cd A+TAB键 cd或者ls+ +首字母+Tab键补全文件名

sudo chmod -R 777 路径(文件夹或文件)   若有锁,普通用户就不能操作该文件夹。此命令解锁文件(文件夹)。

3.Ubuntu 环境下C, C++和Python语言开发

(1)运行c程序:

touch main.c 创建文件main.c

gedit main.c 使用编辑器打开文件main.c

gcc main.c 编译程序main.c,编译后生成一个名为a.out的可执行文件

gcc -Wall main.c -o main 编译程序main.c,编译后生成一个名为main的可执行文件

./a.out 运行该文件

(2)运行c++程序:

touch file.cpp 创建文件file.cpp

gedit file.cpp 使用编辑器打开文件file.cpp

g++ -Wall file.cpp -o file 编译程序file.cpp,编译后生成一个名为file的可执行文件

./file 运行该文件

(3)运行Python程序:

python 启动Python解释器

python hello.py 运行hello.py文件

python hello.py runserver 运行hello.py并处理服务器

(4)附gcc安装简单说明:

sudo apt-get install gcc-6 g++-6    安装gcc,g++

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 53       update-alternatives: --install 需要 <链接> <名称> <路径> <优先级>

sudo update-alternatives --config g++  配置g++

4.文件操作相关命令:

rm file.cpp 删除file.cpp文件

rm -r file 删除file文件夹(空文件夹和非空文件夹均可)

mkdir test 新建一个文件夹test

rmdir test 删除一个空文件夹test

rm -rf test 删除一个非空文件夹test

rm a.c b.c 删除a.c b.c多个文件

cp -r a.txt /home/lab/Desktop/DS 把当前文件夹中的文件a.txt复制到路径(/home/lab/Desktop/DS)下

5.linux下执行.sh文件:

首先,要确保这个文件的类型是可执行的。

有两种办法把文件设置为可执行文件。

1) 直接在文件属性标签中选中 "可执行",--b 如果用的是图形界面,这个方法最简单直接。

2) 使用命令 chmod +x file.sh。将可执行属性添加到文件属性中。

然后,执行这个shell脚本文件。

1) 双击 file.sh 直接运行。 --b 别笑,图形界面的优点: 简单直接。

2) 使用命令 ./file.sh。 --b 好像更简单直接哦。

6.软件使用快捷键(主要适用于gedit):

Ctrl+c 复制
Ctrl+v 粘贴
Ctrl+x 剪切
Ctrl+s 保存
Ctrl+z 撤销
Ctrl+q 退出
Ctrl+w 关闭选项卡
Ctrl+t 缩进
Ctrl+tab 切换



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
本手册是Ubuntu官方手册PDF文件,非影音版文件。而且是Ubuntu最新版本文件 v14.04. 希望能对您有帮助。 Prologue 5 Welcome 5 Ubuntu Philosophy 5 A brief history of Ubuntu 6 Is Ubuntu right for you? 7 Contact details 8 About the team 8 Conventions used in this book 8 1 Installation 9 Getting Ubuntu 9 Trying out Ubuntu 10 Installing Ubuntu—Getting started 11 Finishing Installation 16 2 The Ubuntu Desktop 19 Understanding the Ubuntu desktop 19 Unity 19 The Launcher 21 The Dash 21 Workspaces 24 Managing windows 24 Unity’s Keyboard Shortcuts 26 Browsing files on your computer 26 Files file manager 27 Searching for files and folders on your computer 29 Customizing your desktop 30 Accessibility 32 Session options 33 Getting help 33 3 Working with Ubuntu 37 All the applications you need 37 Getting online 39 Browsing the web 46 Reading and composing email 55 Using instant messaging 59 Viewing and editing photos 64 Watching videos and movies 67 Listening to audio and music 68 Burning cds and dvds 72 Working with documents, spreadsheets, and presentations 75 4 Hardware 77 Using your devices 77 Hardware identification 77 Displays 77 Connecting and using your printer 79 4 getting started with ubuntu 14.04 Sound 80 Using a webcam 81 Scanning text and images 82 Keyboard and mouse 82 Other devices 83 5 Software Management 85 Software management in Ubuntu 85 Using the Ubuntu Software Center 86 Managing additional software 89 Manual software installation 93 Updates and upgrades 94 6 Advanced Topics 97 Ubuntu for advanced users 97 Introduction to the terminal 97 Ubuntu file system structure 99 Securing Ubuntu 100 Why Ubuntu is safe 100 Basic security concepts 101 Users and groups 101 System updates 104 Firewall 104 Encryption 105 Running Windows Programs on Ubuntu 106 7 Troubleshooting 111 Resolving problems 111 Troubleshooting guide 111 Getting more help 116 8 Learning More 117 What else can I do with Ubuntu? 117 Open source software 117 Distribution families 117 Choosing amongst Ubuntu and its derivatives 118 Finding additional help and support 120 The Ubuntu community 121 Contributing 122 A License 123 Creative Commons Attribution–ShareAlike 3.0 Legal Code 123 Creative Commons Notice 129

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值