Welcome to my personal blog site http://ljmeng.site
This article focuses on
No password, enter the command terminal music
to open Netease cloud music, and the terminal shut down automatically
Netease cloud music installation
NetEase cloud official website to download the installation package can be installed
Netease cloud music open after installation method
ubuntu 18.04, Netease cloud music v1.1.0
2019-03-10 Update: Updates the startup script, no longer need to sudo permissions and password
The first encounter this problem go directly to the new scheme, without looking old plan
Older programs
Own programs without a password, Netease cloud music open terminal, and the terminal automatically close
1. ~/.bashrc
Add (Music can be replaced with any command you want) end of the line
alias music='. ~/.music.sh'
of two points and a space intermediate Note
2. ~/
Create a file .music.sh
document reads as follows
#!/bin/bash
echo "password" | sudo -S netease-cloud-music &
sleep 0.1
exit
password changed your password, the file name .misuc.sh
can be changed to a different file name
after this setup is complete, open the terminal and type music to open Netease cloud music, and the terminal will automatically shut down .
The new program
Reference from Gangster find without sudo permissions and passwords can be executed.
For the students used the old plan, run the following command
# 修改文件所属用户和组以及权限
sudo chmod -R ${USER}:${USER} ~/.config/netease-cloud-music
sudo chmod -R ${USER}:${USER} ~/.cache/netease-cloud-music
sudo chmod 755 -R ~/.config/netease-cloud-music
sudo chmod 755 -R ~/.cache/netease-cloud-music
# 目录~/.config/netease-cloud-music和~/.cache/netease-cloud-music
# 分别为网易云音乐的配置和缓存文件
# 若不更改权限会造成网易云音乐无法自动登录以及设置丢失问题
Formal steps are as follows:
1. The same is the official website to download and install
2. In the ~/
new .music.sh
script, which reads as follows:
#!/bin/bash
unset SESSION_MANAGER && netease-cloud-music & #后台运行网易云
disown #使网易云音乐进程不会随终端关闭而结束
exit 0 #自动关闭终端,若不想自动关闭终端可删除该行
3. Set a convenient alias command, the ~/.bashrc
add the following
alias music='. ~/.music.sh'
# 注意在“.”后有一个空格
# 脚本名.music.sh和命令别名music可自行更换成其他名字
4. restart the computer, or the current command input terminal source ~/.bashrc
commencement of step 3 in the alias
5. Enter the command music
can be started Netease cloud music. While the terminal is automatically turned off
After setting Netease cloud music you can play happily in the Ubuntu 18.04 hh
Welcome to my personal blog site