只是简单记录我使用的命令,没有什么参考价值,我只是用于整理

chown

chmod permissions filename

Where,

  • permissions can be read, write, execute or a combination of them.
  • filename is the name of the file for which the permissions need to change. This parameter can also be a list if files to change permissions in bulk

We can change permissions using two modes:

  1. Symbolic mode: this method uses symbols like ugo to represent users, groups, and others. Permissions are represented as  r, w, x for read write and execute, respectively. You can modify permissions using +, - and =.
  2. Absolute mode: this method represents permissions as 3-digit octal numbers ranging from 0-7.

How to Change Permissions using Symbolic Mode

The table below summarize the user representation:

USER REPRESENTATION DESCRIPTION
u user/owner
g group
o other

We can use mathematical operators to add, remove, and assign permissions. The table below shows the summary:

OPERATOR DESCRIPTION
+ Adds a permission to a file or directory
Removes the permission
= Sets the permission if not present before. Also overrides the permissions if set earlier.

Example:

Suppose, I have a script and I want to make it executable for owner of the file zaira.

Current file permissions are as follows:

Let's split the permissions like this:

df -H

The output of df -H will report how much space is used, available, percentage used, and the mount point of every disk attached to your system

Ubuntu 查看磁盘空间大小命令 - 水木清扬 - 博客园

如何设置python3.8为默认python的版本

如何查看 pip 指向哪个 python 版本和 package 包的安装路径?

1> 查看pip3链接的版本
$ pip3 -V
pip 21.2.4 from /opt/homebrew/lib/python3.8/site-packages/pip (python 3.8)

2> 修改pip默认使用的Python版本

which pip 查看其路径

sudo vim /usr/local/bin/pip

#!/usr/bin/python 变成指定的版本。

Steps to Git clone on Ubuntu

git-clone@ubuntu:~$ sudo apt install git
git-clone@ubuntu:~$ git --version
git-clone@ubuntu:~$ git clone https://gitlab.com/cameronmcnz/gitlab-made-easy.git
git-clone@ubuntu:~$ cd my-github-repo
git-clone@ubuntu:~$ git config --global user.email "ubuntu-clone@example.com"
git-clone@ubuntu:~$ git config --global user.name "cameronmcnz"
git-clone@ubuntu:~$ touch my-file.html
git-clone@ubuntu:~$ git add .
git-clone@ubuntu:~$ git commit -m "good commit message"
git-clone@ubuntu:~$ git push origin master

how to create pr open a TXT file

sudo gedit 文件名

error:sudo: gedit: command not found

how to install python3.5 + setuptools+pip

vim: command not found

How to Fix “Vim Command Not Found” Error in Ubuntu

:wq是保存并退出

多python共存,如何设置默认的python版本

2 用户级修改
为某个特定用户修改Python版本,只需要在其home目录下创建一个alias。

step1:打开该用户的~/.bashrc文件:

vim ~/.bashrc

ps:如果没有vim,就看上面一个link,安装下vim就好了,

step2:添加新的别名来修改默认Python版本:

alias python='/usr/bin/python3.5'

PS:我要设置的默认版本是python3.5.这里的path是python3.5的路径,我的在local中,

step3:重新登录或者重新加载.bashrc文件,使操作生效:

$ . ~/.bashrc  

step4:检查当前的Python版本:

$ python --version

这里就会显示python 3.5.0,就是成功了。

这个并不是系统级的修改,系统级的修改可以参考:【Python】Ubuntu修改默认Python版本_remo0x的博客-CSDN博客_ubuntu 更换python版本

ImportError: cannot import name 'HTTPSHandler'

step1: 复制一个文件过来

复制3.9版本中的ssl.so到3.5版本中,但是复制的文件应该是适应3.9的,而不是3.5的,只需要改名就可以了吗?根据下面的文章是这样的,但是我认为不是,还在尝试,我尝试了,修改文件名字是没有用的,可能不兼容

https://blog.csdn.net/jaket5219999/article/details/120805605场景:Mac电脑之前已经通过源码安装了Python3.8,一切都是正常。为了试验asyncio.to_thread方法,又通过源码安装了Python3.9,安装成功之后,创建虚拟环境,发现pip不能用,报错如下```WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to Hhttps://blog.csdn.net/jaket5219999/article/details/120805605

step2: 尝试安装openssl,参考下面文章的方法,常规的操作,但是尝试后发现并没有安装上。openssl安装与使用_WuYuJun's blog的博客-CSDN博客_openssl文章目录1、OpenSSL简介2、 OpenSSL安装3、加密技术介绍4、openssl 命令4.1摘要命令4.2、对称加密命令4.3非对称加密命令4.3.1生成私钥4.3.2提取公钥4.3.3利用公私钥加密、解密数据4.3.4 数字签名4.3.5数字证书1、OpenSSL简介OpenSSL是一个SSL协议的开源实现,采用C语言作为开发语言,具备了跨平台的能力,支持Unix/Linux、Windows、Mac OS等多种平台。  OpenSSL最早的版本在1995年发布,1998年后开始由OpenShttps://blog.csdn.net/caijiwyj/article/details/106840234?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522167566808016800213040362%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=167566808016800213040362&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~top_positive~default-1-106840234-null-null.142%5Ev73%5Econtrol,201%5Ev4%5Eadd_ask,239%5Ev1%5Einsert_chatgpt&utm_term=openssl&spm=1018.2226.3001.4187

ImportError: No module named _ssl

python - ImportError: No module named _ssl - Stack Overflow

报错信息是

(base) ubuntu@gpu-ws:~$ sudo yum install openssl-devel
There are no enabled repos.Run "yum repolist all" to see the repos you have.You can enable repos with yum-config-manager --enable <repo>

yum 相当于是sudo apt-get,因此只需要尝试使用该命令进行安装就可以了。

step2:

修改python的module中的Setup.dist文件,不要注解SSL部分,重新编译该文件,安装python,会在安装python成功后,直接将该包安装成功。

https://blog.csdn.net/xiemanR/article/details/85224509

python卸载 - ubuntu

常见指令失效,报错信息是: Package 'libpython3.5-minimal' is not installed, so not removed

Ubuntu卸载python(慎重)_痴迷、淡然~的博客-CSDN博客_ubuntu卸载了python

brew安装后无法使用,

其他人在服务器中安装了brew,但是我登录后,却显示是no command,然后我查找资料,发现可能是安装后没有激活,或者说是配置环境,然后参考这个文章,尝试配置环境,但是我找不到其他人配置的路径,但是我看了一个/home处输入.bash_profile后,看到了有两个配置信息,不知道是谁配置的,由于我也无权利修改该文件,只能搁置。然后我上了brew官网又重新安装了一下。但是输入那个命令后,我还是找不到安装路径,但是输入brew确实是可以使用了。

Mac系统下安装Homebrew后无法使用brew命令 - 简书

删除文件/文件夹

实例:

删除文件夹实例:

rm -rf /var/log/httpd

这句代码的意思是:删除/var/log/httpd目录以及其下所有文件、文件夹

删除文件实例:

rm -f /var/log/httpd/access.log

这个将会强制删除/var/log/httpd/access.log这个文件

复制文件

cp 要复制文件的path 目的path

Ubuntu - command checklist相关推荐

  1. Ubuntu command 记录

    1.修改主机名 查看: root# : hostname guest#  : sudo /etc/hostname vi /etc/hostname     #只有一行,直接改就成 vi /etc/h ...

  2. ubuntu command

    uninstall software: sudo apt-get purge openjdk* 转载于:https://www.cnblogs.com/bioinfo/p/3659683.html

  3. ubuntu 14.04安装postgresql最新版本

    官网: https://www.postgresql.org/download/linux/ubuntu/ ---------------------------------------------- ...

  4. docker手册_Docker手册

    docker手册 The concept of containerization itself is pretty old, but the emergence of the Docker Engin ...

  5. Kernel 社区 开发准备工作mutt 邮件使用

    前言 Rust 的引入 对社区来说 是个 长期 且 可以从头 构建 kernel 的过程,这是一个很好的机会 日常的驱动开发,对工作有很大的好处,尤其是,最新的硬件抽象接口,和硬件协议 安装 mutt ...

  6. 大家都较熟悉之 Kubernetes API 分析

    作者:高朋,科赛网(kesci.com)工程师. 致力于让深度学习和数据分析走进个人的开放平台,已完成所有数据分析平台部署于K8S. Kubernetes概览 以下是 k8s 的整体架构,在 mast ...

  7. How to debug HTTP requests when developing and testing Web applications and clients

    How to debug HTTP requests when developing and testing Web applications and clients How to debug HTT ...

  8. dashboard 镜像源_使用 tekton 做 CI/CD

    项目源码: The Tekton Pipelines project provides k8s-style resources for declaring CI/CD-style pipelines. ...

  9. Java-pdf无限压缩方案-优化内存问题

    背景 因项目需求,项目中需要提供pdf压缩功能.将某一页压缩至1M大小. 场景的Java的pdf处理方案就是itext pdfbox 以及 apose 方案一:itext压缩(不推荐) 代码 /*** ...

最新文章

  1. IAR实际使用过程中遇到的问题
  2. PAT甲级1120 Friend Numbers:[C++题解]set去重且有序
  3. 一份微服务架构手稿图,彻底搞定微服务核心原理!
  4. JRE与JDK,SDK的区别
  5. python 分词 识别_python分词如何实现新词识别
  6. vue实现数字“滚动式增加”效果 【插件化封装】
  7. 大端字节序小端字节序(网络字节序主机字节序)
  8. Modules:PETCTFusion-Documentation-3.6
  9. HTML5使用Div标签来实现表格
  10. java key锁_Java细粒度锁实现的3种方式
  11. 剑指 Offer 64. 求1+2+…+n(面试题中的短路与)
  12. Postman局部变量设置
  13. 关于计算机取代学校的英语作文,关于网络教室将取代传统的教室英语作文
  14. 计算机维修5级,电脑芯片级维修教程
  15. C++程序设计:输出n层金字塔图形
  16. html上传动态图片不显示图片,解决 viewer.js 动态更新图片导致无法预览的问题
  17. Matlab 元胞数组和结构体
  18. 【渗透测试】密码暴力破解工具——九头蛇(hydra)使用详解及实战
  19. CSS line-height与vertical-align
  20. mysql 建立超级用户_mysql创建超级用户

热门文章

  1. bp神经网络需要多少样本,bp神经网络训练时间
  2. hash表(学习笔记)
  3. 福州大学计算机学院李敏,福州大学厦门工艺美术学院
  4. jenkins报错:java.lang.illegalstateexception already existed will not overwrite with
  5. Java mail 535鉴权失败或启动报错
  6. [19保研]北京大学信息工程学院关于举办“2018年全国优秀大学生科技夏令营”的通知...
  7. 本地直播平台的搭建—四种方式
  8. sigsuspend 函数 释疑
  9. 我们的管理:部门管理
  10. 51单片机控制直流电机