Ubuntu - command checklist

阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6

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

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 REPRESENTATIONDESCRIPTION
uuser/owner
ggroup
oother

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

OPERATORDESCRIPTION
+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 查看磁盘空间大小命令 - 水木清扬 - 博客园

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 文件名

errorsudo: gedit: command not found

阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6
标签: Ubuntu