首页 > 系统 > Linux > 正文

linux basic commands

2024-06-28 13:19:17
字体:
来源:转载
供稿:网友
linux basic commands

1. man - an interface to the on-line reference manuals

$man man

2. apt - advanced package tool

  SEE ALSO: apt-cache, apt-get, apt.conf, sources.list

$apt-cache search MySQL

3.sudo - execute a command as another user (sudo allows a permitted user to execute a command as the superuser or another user, as specified by the security policy.)

$sudo apt-get install python2.7

4.su - change user ID or become superuser

cc@debian:~$suPassWord:root@debian:/home/cc#su -- cccc@debian:~$

5. ls - list directory contents

$ls -l
$ls -la

6. pwd - PRint name of current/working directory

$pwd

7. mkdir - make directories

$mkdir test1

8. mv - move (rename) files

$mv test1 test2

9.rm - remove files or directories

$rm -fr test2

10.more, less - file perusal filter for crt viewing (a filter for paging through text one screenful at a time.)

$man more|less

note: '|' is pipeline, see more on wiki about pipeline

11.grep - grep, egrep, fgrep, rgrep - print lines matching a pattern

$ls -la|grep django-web

12.chown - change file owner and group

#chown root /u#chown root:staff /u

13.chmod - change file mod bits

#mkdir /data#chmod 777 /data


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表