centOS9 入门和.net Core入门

1 cent OS 9安装 .net core 6

centos9 安装.net Core SDK
https://access.redhat.com/documentation/en-us/net/6.0/html/getting_started_with_.net_on_rhel_9/making-open-source-more-inclusive
--安装目录
https://access.redhat.com/documentation/en-us/net/6.0/html/getting_started_with_.net_on_rhel_9/installing-dotnet_getting-started-with-dotnet-on-rhel-9
安装sdk
sudo yum install dotnet-sdk-6.0 -y

centos 基础命令

2、pwd 显示当前用户所在的目录!

3、mkdir 创建目录,-p 递归创建文件夹,创建的是隐藏文件夹,无法查看,在桌面desktop,下,用的是centos9 系统

4、rmdir 删除目录,-p 递归删除文件夹

cat view a file  ,查看一个文件的内容
The 'cat' command is the most universal and powerful tool. It is considered to be one of the most frequently used commands. It can be used to display the content of a file, copy content from one file to another, concatenate the contents of multiple files, display the line number, display $ at the end of the line, etc.


-- 基本命令
tab  自动补提
Control + d,退出应用程序 ==exit
control +c .停掉正在运行的程序
control +l 清屏 ===clear
------------------------------------------切换目录命令,进入当前目录命令,进入跟目录命令
cd /  /代表顶底目录
cd /+目录 例如 cd /home/weidong(user)/Documents ,cd /加一下代码切换目录
cd  + home  代表 ,当前目录下面的home
cd  .. 代码返回上一次目录 ,cd .代表当前目录  ,cd ../user/Downloads 代码相对路径

--目录查看, ls -a 
ls ,查看当前目录下的所有文件和目录(文件夹)
ls -a ,列出当前所有的目录,
ls -l 或者 ll,当前目录目录下的所有目录,和文件,列表查看
ls 加目录例如: ls   ls /home /user/Desktop/deploy ,显示指定目录下的文件和文件夹
ls 列明目录有特殊符号,需要用单引号引起来例如:docker_.net6test ,需要写成 ls /home /user/Desktop/deploy/'docker_.net6test'

--目录操作【增,删,改,查】,m加权限,-p设置多个目录
mkdir ,新增目录,创建多个目录加P
mkdir test1/test2/test3/test4 mkdir: cannot create directory `test1/test2/test3/test4': No such file or directory <== 没办法直接创建此目录啊![root@www tmp] mkdir -p test1/test2/test3/test4

rmdir  ,删除目录
rmdir  , tree,可以查看目录树
  tree  , rmdir -p test2/test3/test4 ,删除当前目录下为空以及父目录为空


rm 删除目录 rm -d remove empty directoriest
  rm test1/test2 ,同样可以删除多个目录


 rm,删除文件 ,rm a.txt 删除文件

删除目录:
rm -r aaa 递归删除当前目录下的aaa目录
rm -rf aaa 递归删除当前目录下的aaa目录(不询问)

全部删除:
rm -rf 将当前目录下的所有目录和文件全部删除17:42 2023/6/7
rm -rf / 【自杀命令!慎用!慎用!慎用!】将根目录下的所有文件全部删除

一 创建文件
tauch  a.txt .创建了一个txt 文件
--vim主要是保存和编辑文件
How to Use Vim Command Mode
We can access the command mode by typing : in normal mode. It will bring the cursor to the bottom of the screen, followed by a colon. Below are some of the most useful vim command in Linux.
:w save changes to file
:wq save and quit
:saveas FILE save the current file as FILE
:q  quit vim
:q! quit and discard changes
:e FILE open FILE for editing
:help open help

二移动文件
mv 移动文件 ,移动文件夹

mv [-fiu] source destination [root@www ~] mv [options] source1 source2 source3 .... directory
mv a.txt /home/weidong/Desktop/test2020 ,就会将a.txt移动到 test2020文件夹
mv m16:24 2023/6/7 /home/weidong/Desktop/test2020 ,就会将m(文件夹)移动到 test2020文件夹
cp 即拷贝文件和目录。
语法:
[root@www ~] cp [-adfilprsu] 来源档(source) 目标档(destination) [root@www ~] cp [options] source1 source2 source3 .... directory
mv重命名 ,  mv m m1,将吗重新命名为 m1 
mv -b a/aa b/ mv 先备份,再移动
mv -f a/aa b  强制覆盖,不备份
mv -i a/aa b  提示是否覆盖

三、拷贝目录
命令:cp -r 目录名称 目录拷贝的目标位置 -r代表递归
示例:将/usr/tmp目录下的aaa目录复制到 /usr目录下面 cp /usr/tmp/aaa /usr
注意:cp命令不仅可以拷贝目录还可以拷贝文件,压缩包等,拷贝文件和压缩包时不 用写-r递归
--find ,搜索命令
find -name  搜索文件夹和文件 find -name a.txt ,搜索a.txt 文件
压缩文件
 tar  --command  进行文件的压缩和文件的解压
liunx  Examples:
tar  -cf archive.tar  foo bar  # create archive.tar from files foo and bar .
tar -tvf archibe.tar              #list all files in archive.tar verbosely
tar  -xf archibe.tar            #Extract all files from archive.tar


tar -cf archive.tar      a.jpg b.jpg a(文件夹)   --压缩文件 ,实际使用
tar - xf   待解压文件名  -C(大写)   目录  
------------------------------------------------------------------------
chmod    英文全拼, change  mode ,命令控制用户权限
r,读的权限,w,写的权限,x(Excute),之前的权限 (Owner ),只要文件所有者,和超级用户可以修改文件和目录的权限

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值