Linux常用命令

    技术2023-11-10  71

    Linux创建账户 sudo useradd -d /home/username -g dlg -m username sudo passwd wxm 注解: -c comment 指定一段注释性描述。 -d 目录 指定用户主目录,如果此目录不存在,则同时使用-m选项,可以创建主目录。 -g 用户组 指定用户所属的用户组。 -G 用户组,用户组 指定用户所属的附加组。 -s Shell文件 指定用户的登录Shell。 -u 用户号 指定用户的用户号,如果同时有-o选项,则可以重复使用其他用户的标识号。 查看所在目录 pwd scp文件传输 scp username@address:/file1_directory/file_name file2_directory nohup后台运行程序 nohup python train.py > train.log & tailf train.log #动态查看log 查看显卡动态 watch -n 5 nvidia-smi 或者 gpustat -i ssh key 检查SSH keys是否存在 ls -al ~/.ssh # Lists the files in your .ssh directory, if they exist 生成新的ssh key ssh-keygen -t rsa -C "your_email@example.com" # Creates a new ssh key using the provided email Generating public/private rsa key pair. Enter file in which to save the key (/your_home_path/.ssh/id_rsa): 添加 SSH key到Linux cat ~/.ssh/id_rsa.pub vim ~/.ssh/authorized_keys
    Processed: 0.017, SQL: 9