dpkg-reconfigure keyboard-configure
Ubuntu13及之前:apt-get install ia32-libs*
Ubuntu14: apt-get install libgtk2.0.0:i386
-
安装gcc,svn,ncurses(提供字符终端处理库:make menuconfig)
1. gcc : apt-get install build-essential
2. svn : apt-get install subversion
3.ncurses: apt-get install libgtk2.0.0:i386
添加用户:
adduser [-G 用户组] [-d 用户home文件夹路径] [-s /bin/bash 用户登入后默认使用shell]
设置密码:passwd xxx(用户名)
修改home目录:usermod -d xxx(目录) xxx(用户名)
添加用户到用户组:usermod -G xxx(用户组名) -a xxx(用户名)
Ex: usermod -G root -a joey #joey 加入root用户组
添加sudoers:
1. chmod u+x /etc/sudoers
2. vi /etc/sudoers 添加 xxx(用户名) ALL+(ALL) ALL
3. chmod u-x /etc/sudoers
查看用户信息:cat /etc/group
删除用户:deluser xxx(用户名)
查看磁盘分区:
1. df -h : 查看分区信息
2. fdisk [分区文件名 ] -l: 查看分区详细信息,需sudo
添加磁盘:
1.fdisk /dev/xxx(磁盘文件名)
2.n #添加磁盘
3.p #设置为主分区
4.l #partition number
5.w # write config
6. fdisk -l
格式化磁盘:mkfs -t ext4(文件系统) /dev/sdb1(磁盘文件名)
挂载磁盘:
1. vi /etc/fstab
2. 添加:
设备名 挂载点 文件系统类型 挂载选项(以','分隔)
/dev/sdb1 /mnt/sdb1 ext4 default 0 0
1.
apt-get install openssh-server
2.
/etc/ssh/sshd-config #配置sshd
3.
/etc/init.d/ssh start # 启动sshd
SSH 登入后'方向键'、'BackBreak'、'Tab' 显示为字符:
1.
echo $SHELL # 查看当前登入后使用的shell or bash
2. 修改登入方式:
vi /etc/passwd ,找到用户所在行,并行尾添加修改: /bin/bash (默认是/bin/sh)
install:
sudo apt-get install samba samba-common
start:
service samba restart/start
查看状态:
samstatus
用户管理:
创建:
smbpasswd -a xxx(用户名)
删除:
smbpasswd -x xxx(用户名)
禁用:
smbpasswd -d xxx(用户名)
启用:
smbpasswd -e xxx(用户名)
配置:
vi /etc/samba/smb.conf
1. 用户home目录权限设定
-
[homes]
-
comment = Home Directories
-
browseable = no
-
-
# By default, the home directories are exported read-only. Change the
-
# next parameter to 'no' if you want to be able to write to them.
-
read only = no
-
-
# File creation mask is set to 0700 for security reasons. If you want to
-
# create files with group=rw permissions, set next parameter to 0775.
-
create mask = 0775
-
-
# Directory creation mask is set to 0700 for security reasons. If you want to
-
# create dirs. with group=rw permissions, set next parameter to 0775.
-
directory mask = 0775
-
-
# By default, \\server\username shares can be connected to by anyone
-
# with access to the samba server.
-
# Un-comment the following parameter to make sure that only "username"
-
# can connect to \\server\username
-
# This might need tweaking when using external authentication schemes
-
valid users = %S
2. 多用户共享文件夹设置
-
[rssd_share]
-
comment = share dirs for all sders
-
path = /mnt/sdb1/home1/rssd_share
-
public = yes
-
writable = yes
-
valid users = user1;user2;
-
browserable = yes
-
directory mask = 0777
-
create mask = 0777
Windows下挂载samba共享文件夹,出现“同一机器上不能同时使用两个帐号登录”错误:
1. net use * /del /y #(删除所有挂载的网路驱动盘)
2. 重新挂载
阅读(692) | 评论(0) | 转发(0) |