Ubuntu

GRUB Rescue

2019-01-06. Category & Tags: GRUB, Rescue, Boot, Linux, Ubuntu

When being forced into GRUB rescue mode, run ls and ls <one_partition> to check available partitions and find the one that we should boot from [ref]. Then set prefix & root [ref]: set root=(hdX,Y) set prefix=(hdX,Y)/boot/grub insmod normal normal To avoid doing this every time, it is recommened to use a live-USB/ISO to repair GRUB (usually only Desktop version can be in live-USB and easy to setup WIFI). (// it should be also ok to do this without USB if there is a nix system working on current HDD). ...

Install & Use R & RStudio

2017-05-08. Category & Tags: R, Install, Ubuntu, Linux, Rstudio

R IN WINDOWS # Download here and install. R IN UBUNTU 18.04 # sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 && \ sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/' && \ sudo apt update && \ sudo apt install -y r-base r-base-dev libcurl4-openssl-dev libssl-dev build-essential && \ sudo -i R # install packages as root, so all users can use. Commonly used packages: install.packages(c('devtools', 'digest', 'repr', 'IRdisplay', 'crayon', 'pbdZMQ', 'ggplot2', 'IRkernel', 'ggpubr')) DigitalOcean ...

Mount NTFS in Linux Ubuntu

2017-03-13. Category & Tags: NTFS, Ubuntu

Make mount point: mkdir /mnt/win Find the partition lsblk Temp Mount mount -t ntfs-3g /dev/sda4 /mnt/win Easy Fstab Mount with All Permissions 1.find uuid: sudo blkid |grep ntfs 2.add in fstab: UUID=asdf1234 /mnt/win10c ntfs-3g defaults,windows_names,locale=en_US.utf8 0 0 For advanced permission control, see askubuntu

Force Ubuntu desktop Boot into Text Console Mode

2016-12-15. Category & Tags: Linux, Ubuntu, Console, X

Tested in ubuntu deskop 16. short url: s_force-text SOLUTION # sudo cp /etc/default/grub /etc/default/grub.bak && \ sudo sed -ie 's/GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT="text"/g' /etc/default/grub && \ sudo sed -ie 's/GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX="text"/g' /etc/default/grub && \ sudo sed -ie 's/#GRUB_TERMINAL/GRUB_TERMINAL/g' /etc/default/grub && \ sudo update-grub && \ sudo systemctl enable multi-user.target --force && \ sudo systemctl set-default multi-user.target && \ sudo reboot OBS: sometimes, by changing “multi-user.target” is enough, but sometimes we have to update grub. Have not dug into the reason. ...

Completely Automatic Unattended Install of Ubuntu

2016-12-14. Category & Tags: Linux, Automatic, Ubuntu, Installation

OBS 1: this works only for ubuntu server edition, not desktop version. tested in ubuntu 16 x64. OBS 2: remember to change some parts to real values, near: # modify to real value !!! OBS 3: my version need some files in .iso file: “10_linux” & “sources.list”. Warn: the default ks.cfg partition settings will erase the entire disk, and use LVM. See also: Boot Partitions, Install Multi-OS easy2boot PREPARE, AS ROOT # sudo -s ...

Locale In Case Of

2016-05-31. Category & Tags: Linux, Locale, Ubuntu

Reconfig Locale # Option 1: mkdir -p /var/lib/locales/supported.d/ && \ echo "en_GB.UTF-8 UTF-8" > /var/lib/locales/supported.d/gb && \ echo "zh_CN.UTF-8 UTF-8" > /var/lib/locales/supported.d/zh && \ echo "sv_SE.UTF-8 UTF-8" > /var/lib/locales/supported.d/se && \ locale-gen Option 2: dpkg-reconfigure locales can use first character of locale-name to nevigate. ref

Learning Linux Ubuntu etc.

2013-07-24. Category & Tags: Linux, Ubuntu

see also: upper item: /nix 命令行操作最日常、最基础、必须熟练掌握的肌肉记忆 # 新手建议先在 VMWare中安装Ubuntu。 南方科大 于仕琪:半小时速通 13 个命令:常用的Linux命令介绍:13个基本命令和Shell脚本编程.每一个命令都要一个字母一个字母地手敲! 菜鸟教程:从 Linux 系统目录结构 学起,一直到 Shell 文件包含(注意:磁盘操作之前,在 VMWare 暂停虚拟机并新建快照)(这些命令,不用一定会忘,但是作为研究生级别,应该手敲一遍) ps: 如果以上教程都看不懂,可以看 黑马教程,因为他们的视频废话很多(信息密度极低)。 出错时才是学习时,没错误就创造错误! 作为新手,没有资格思考;不在敲键盘就是不在学习! 高阶 # 高阶也有视频 速学150个Linux常用命令 9.5h,但是大部分情况应该边用边学,跟着需求走,高阶的命令细节可以过一下,自己写个笔记更重要。 多年前(2012)写的“鸟哥的 Linux 私房菜”学习笔记: /vbird-linux-1 /vbird-linux-2 /vbird-linux-3 /vbird-linux-4

NIX (unix OR”linux” OR”ubuntu” OR”kubuntu” OR”redhat” OR”debian” OR”centos” OR”fedora”)

2013-07-24. Category & Tags: Linux, Ubuntu

See also: play/test distributions online: /nix-online distribution comparison: /nix-distro bit.ly/s_distro Learning Linux Basics: 鸟哥 in Chinese Git: bit.ly/s_git SSH: bit.ly/s_ssh Locale: bit.ly/s_locale How To Set Up a PC as a Router: /router-how-to 安装 Install # 虚拟机安装 # 新手建议用虚拟机,vmware 或者 virtualbox。 详见: /vmware 手动安装 install ubuntu 2204 manually # 略 自动批量安装 automaic / unattended installation of ubuntu # http://askubuntu.com/questions/122505/how-do-i-create-a-completely-unattended-install-of-ubuntu Completely-Automatic-Unattended-Install-of-Ubuntu-Auto-system-config-kickstart 多系统启动菜单 multi systems selection # multi-operating-system-installation 简单配置 # disable update 关闭自动更新 # 桌面版 Desktop 以练习为目的,建议关闭自动更新 turn off system updates (安全更新可以不关 except security updates) ...

linux,ubuntu添加开机自动运行程序方法autorun

2011-12-19. Category & Tags: Leading Autorun, Leading, Linux, Ubuntu

1. 开机自动运行 # Linux 加载后, 它将初始化硬件和设备驱动, 然后运行第一个进程 init。init 根据配置 文件继续引导过程,启动其它进程。通常情况下,修改放置在 /etc/rc 或 /etc/rc.d 或 /etc/rc?.d 目录下的脚本文件,可以使 init 自动启动其它程序。例如:编辑 /etc/rc.d/rc.local 文件(该文件通常是系统最后启动的脚本), 在文件最末加上一行“xinit”或“startx”,可以在开机启动后直接进入 X-Window。 2. 登录自动运行 # 用户登录时,bash 先自动执行系统管理员建立的全局登录 script : /ect/profile 然后 bash 在用户起始目录下按顺序查找三个特殊文件中的一个: /.bash_profile、 /.bash_login、 /.profile, 但只执行最先找到的一个。因此,只需根据实际需要在上述文件中加入命令就可以实 现用户登录时自动运行某些程序(类似于 DOS 下的 Autoexec.bat)。 3. 退出自动运行 # 退出登录时,bash 自动执行个人的退出登录脚本 /.bash_logout。 例如,在/.bash_logout 中加入命令“tar -cvzf c.source.tgz *.c”,则在每次退出 登录时自动执行 “tar” 命令备份 *.c 文件。 4. 定时自动运行 # Linux 有一个称为 crond 的守护程序,主要功能是周期性地检查 /var/spool/cron 目录 下的一组命令文件的内容,并在设定的时间执行这些文件中的命令。用户可以通过 crontab 命令来建立、修改、删除这些命令文件。 ...